{
"name": "HTML5 and CSS",
"order": 2,
"time": "5h",
"challenges": [
{
"id": "bd7123c8c441eddfaeb5bdef",
"title": "Say Hello to HTML Elements",
"description": [
"Welcome to Free Code Camp's first coding challenge.",
"You can edit code
in your text editor
, which we've embedded into this web page.",
"Do you see the code in your text editor that says <h1>Hello</h1>
? That's an HTML element
.",
"Most HTML elements have an opening tag
and a closing tag
.",
"Opening tags look like this:",
"<h1>
",
"Closing tags look like this:",
"</h1>
",
"Note that the only difference between opening tags and closing tags is that closing tags have a slash after their opening angle bracket.",
"Each challenge has tests that you can run at any time by clicking the \"Run tests\" button. Once you get all tests passing, you can advance to the next challenge.",
"To pass the test on this challenge, change your h1
element's text to say \"Hello World\" instead of \"Hello\". Then click the \"Run tests\" button."
],
"tests": [
"assert.isTrue((/hello(\\s)+world/gi).test($('h1').text()), 'message: Your h1
element should have the text \"Hello World\".');"
],
"challengeSeed": [
"
código
en tu editor de texto
, que hemos incrustado en esta página web.",
"¿Ves el código en tu editor de texto que dice <h1>Hello</h1>
? Ese es un elemento
HTML.",
"La mayoría de los elementos HTML tienen una etiqueta de apertura
y una etiqueta de cierre
. Las etiquetas de apertura se ven como: <h1>
. Las etiquetas de cierre se ven como: </h1>
. Fíjate que la única diferencia entre las etiquetas de apertura y de cierre es que estas últimas tienen un / después de su signo de apertura (<).",
"Cada desafio tiene pruebas que puedes ejecutar en cualquier momento presionado el botón \"Ejecutar pruebas\". Una vez logres pasar todas las pruebas, podrás avanzar al siguiente desafio.",
"Para pasar la prueba en este desafio, cambia tu texto de la etiqueta h1
para que diga \"Hello World\" en lugar de \"Hello\". Entonces presiona el botón \"Ejecutar pruebas\"."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Begrüße die HTML Elemente",
"descriptionDe": [
"Willkommen bei der ersten Programmier-Challenge von Free Code Camp! Klicke auf den folgenden Button für weitere Instruktionen.",
"Sehr gut. Jetzt kannst du den Rest der Instruktionen für diese Challenge lesen.",
"Mithilfe des eingebauten Text Editors
kannst du den Code
bearbeiten.",
"Siehst du den Code <h1>Hallo</h1>
im Editor? Das ist ein HTML Element
",
"Die meisten HTML Elemente haben eine öffnende Auszeichnung (Tag)
und eine sich schließende
. Öffnende Tags sehen so aus: <h1>
. Schließende Tags so: </h1>
. Beachte, dass der einzige Unterschied zwischen öffnenden und schließenden Tags in dem Slash besteht, das bei schließenden Tags auf die sich öffnende spitze Klammer folgt.",
"Sobald du eine Challenge abgeschlossen hast und alle Tests erfolgreich sind, wird der Button \"Go to my next challenge\" aktiv. Klicke auf diesen – oder drücke Steuerung (Control) und gleichzeitig Enter – um zur nächsten Challenge zu gehen.",
"Um den Button \"Go to my next challenge\" dieser Lektion zu aktivieren, ändere den Inhalt des h1
Tags von \"Hello\" zu \"Hello World\"."
]
},
{
"id": "bad87fee1348bd9aedf0887a",
"title": "Headline with the h2 Element",
"description": [
"Over the next few challenges, we'll build an HTML5 app that will look something like this:",
"",
"The h2
element you enter will create an h2
element on the website.",
"This element tells the browser how to render the text that it contains.",
"h2
elements are slightly smaller than h1
elements. There are also h3
, h4
, h5
and h6
elements.",
"Add an h2
tag that says \"CatPhotoApp\" to create a second HTML element
below your \"Hello World\" h1
element."
],
"tests": [
"assert(($(\"h2\").length > 0), 'message: Create an h2
element.');",
"assert(code.match(/<\\/h2>/g) && code.match(/<\\/h2>/g).length === code.match(/h2
element has a closing tag.');",
"assert.isTrue((/cat(\\s)?photo(\\s)?app/gi).test($(\"h2\").text()), 'message: Your h2
element should have the text \"CatPhotoApp\".');",
"assert.isTrue((/hello(\\s)+world/gi).test($(\"h1\").text()), 'message: Your h1
element should have the text \"Hello World\".');"
],
"challengeSeed": [
"h2
que ingreses creará un elemento h2
en el sitio web.",
"Este elemento le dice al navegador cómo mostrar el texto que contiene.",
"Los elementos h2
son ligeramente más pequeños que los elementos h1
. También hay elementos h3
, h4
, h5
y h6
",
"Agrega una etiqueta h2
que diga \"CatPhotoApp\" para crear un segundo elemento
HTML debajo de tu elemento h1
\"Hello World\"."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Überschrift mit dem h2 Element",
"descriptionDe": [
"Füge unter h1
\"Hello World\" ein zweites HTML Element h2
hinzu, in dem \"CatPhotoApp\" steht.",
"Das eingetragene h2
Element wird ein h2
Element auf der Website erzeugen.",
"Dieses Element sagt dem Browser, wie der darin enthaltene Text gerendert wird.",
"h2
Elemente sind ein wenig kleiner als h2
Elemente. Es gibt auch h3
, h4
, h5
und h6
Elemente."
]
},
{
"id": "bad87fee1348bd9aedf08801",
"title": "Inform with the Paragraph Element",
"description": [
"p
elements are the preferred element for normal-sized paragraph text on websites. P is short for \"paragraph\".",
"You can create a p
element like this:",
"<p>I'm a p tag!</p>
",
"Create a p
element below your h2
element, and give it the text \"Hello Paragraph\"."
],
"tests": [
"assert(($(\"p\").length > 0), 'message: Create a p
element.');",
"assert.isTrue((/hello(\\s)+paragraph/gi).test($(\"p\").text()), 'message: Your p
element should have the text \"Hello Paragraph\".');",
"assert(code.match(/<\\/p>/g) && code.match(/<\\/p>/g).length === code.match(/p element has a closing tag.');" ], "challengeSeed": [ "
p
son los elementos preferidos en los sitios web para los párrafos de texto en tamaño normal. La P es abreviatura de \"párrafo\".",
"Tú puedes crear un elemento párrafo como éste: <p>¡Soy una etiqueta p!</p>
",
"Crea un elemento p
debajo de tu elemento h2
, y ponle el texto \"Hello Paragraph\"."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Informiere mit dem Paragraph Element",
"descriptionDe": [
"Erstelle ein p
Element unter deinem h2
Element und füge den Text \"Hello Paragraph\" ein.",
"p
Elemente sind das bevorzugte Element für normalen Paragraphen-Text auf einer Website. P ist die Abkürzung für \"Paragraph\".",
"Du kannst ein p
Element so erzeugen: <p>Ich bin ein p Element!</p>
"
]
},
{
"id": "bad87fee1348bd9aedf08802",
"title": "Uncomment HTML",
"description": [
"Commenting is a way that you can leave comments within your code without affecting the code itself.",
"Commenting is also a convenient way to make code inactive without having to delete it entirely.",
"You can start a comment with <!--
and end a comment with -->
",
"Uncomment your h1
, h2
and p
elements."
],
"tests": [
"assert($(\"h1\").length > 0, 'message: Make your h1
element visible on your page by uncommenting it.');",
"assert($(\"h2\").length > 0, 'message: Make your h2
element visible on your page by uncommenting it.');",
"assert($(\"p\").length > 0, 'message: Make your p
element visible on your page by uncommenting it.');",
"assert(!/-->/gi.test(code), 'message: Be sure to delete all trailing comment tags, i.e. -->
.');"
],
"challengeSeed": [
""
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
"nameFr": "",
"descriptionFr": [],
"nameRu": "",
"descriptionRu": [],
"nameEs": "Quita comentarios HTML",
"descriptionEs": [
"\"Comentar\" es una manera en la que puedes dejar anotaciones en tu código sin afectar el código mismo.",
"Comentar también es una forma conveniente de desactivar código sin tener que borrarlo por completo.",
"Puedes comenzar un comentario con <!--
y terminar de comentar con -->
",
"Quita el comentario a los elementos h1
, h2
y p
"
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: HTML entkommentieren",
"descriptionDe": [
"Entkommentiere deine h1
, h2
und p
Elemente.",
"Kommentieren erlaubt dir Kommentare innerhalb des Codes zu hinterlassen, ohne diesen selbst zu beeinflussen.",
"Dies ist auch ein guter Weg, um Code inaktiv zu machen ohne diesen komplett löschen zu müssen.",
"Du kannst einen Kommentar mit <!--
starten und ihn mit -->
wieder beenden."
]
},
{
"id": "bad87fee1348bd9aedf08804",
"title": "Comment out HTML",
"description": [
"Remember that in order to start a comment, you need to use <!--
and to end a comment, you need to use -->
",
"Here you'll need to end the comment before your h2
element begins.",
"Comment out your h1
element and your p
element, but leave your h2
element uncommented."
],
"tests": [
"assert(($(\"h1\").length === 0), 'message: Comment out your h1
element so that it is not visible on your page.');",
"assert(($(\"h2\").length > 0), 'message: Leave your h2
element uncommented so that it is visible on your page.');",
"assert(($(\"p\").length === 0), 'message: Comment out your p
element so that it is not visible on your page.');",
"assert(code.match(/-->/g).length > 1, 'message: Be sure to close each of your comments with -->
.');"
],
"challengeSeed": [
""
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
"nameFr": "",
"descriptionFr": [],
"nameRu": "",
"descriptionRu": [],
"nameEs": "Comenta en HTML",
"descriptionEs": [
"Recuerda que para comenzar un comentario, necesitas usar <!--
y para terminar un comentario, necesitas usar -->
",
"Aquí necesitarás terminar el comentario antes que comience el elemento h2
.",
"Comenta el elemento h1
y el elemento p
, pero deja sin comentar el elemento h2
"
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: HTML auskommentieren",
"descriptionDe": [
"Kommentiere die Elemente h1
und p
aus, aber lasse dein h2
Element unkommentiert.",
"Denk daran, dass du einen Kommentar mit <!--
anfangen und mit -->
wieder beenden kannst.",
"Hier wirst du deinen Kommentar vor dem h2
Element beenden müssen."
]
},
{
"id": "bad87fee1348bd9aedf08833",
"title": "Fill in the Blank with Placeholder Text",
"description": [
"Web developers traditionally use lorem ipsum text
as placeholder text. It's called lorem ipsum text because those are the first two words of a famous passage by Cicero of Ancient Rome.",
"Lorem ipsum text has been used as placeholder text by typesetters since the 16th century, and this tradition continues on the web.",
"Well, 5 centuries is long enough. Since we're building a CatPhotoApp, let's use something called kitty ipsum text
.",
"Replace the text inside your p
element with the first few words of this kitty ipsum text: Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
"
],
"tests": [
"assert.isTrue((/Kitty(\\s)+ipsum(\\s)+dolor/gi).test($(\"p\").text()), 'message: Your p
element should contain the first few words of the provided kitty ipsum text
.');"
],
"challengeSeed": [
"Hello Paragraph
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Llena espacios con texto de relleno", "descriptionEs": [ "Los desarrolladores web tradicionalmente usanLorem Ipsum
como texto de relleno. Se llama texto Lorem Ipsum porque esas son las primeras dos palabras de una cita famosa de Cicerón de la Roma Antigua.",
"El texto Lorem Ipsum ha sido usado como texto de relleno en las imprentas desde el siglo 16, y esta tradición continúa en la web.",
"Bueno, 5 siglos es bastante. Ya que estamos construyendo una aplicación de fotos de gatos (CatPhotoApp), ¡usemos algo llamado Kitty Ipsum
!",
"Remplaza el texto dentro de tu elemento p
con las primeras palabras de este texto kitty ipsum: Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
"
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Fülle die Lücken mit Platzhalter-Text",
"descriptionDe": [
"Ersetze den Text in deinem p
Element mit den ersten Wörtern des zur Verfügung gestellten \"Kitty Ipsum\" Textes.",
"Webentwickler nutzen für gewöhnlich \"Lorem Ipsum\" Text als Platzhalter. Es heißt \"Lorem Ipsum\", weil es die ersten zwei Wörter aus einer bekannten Passage von Cicero des alten Roms sind.",
"\"Lorem Ipsum\" Text wurde seit dem 16. Jahrhundert von Schriftsetzern als Platzhalter verwendet. Und diese Tradition setzt sich im Web fort.",
"Nun gut, fünf Jahrhunderte sind lange genug. Da wir eine CatPhotoApp entwickeln, lass uns stattdessen lieber \"Kitty Ipsum\" nutzen!",
"Hier sind die ersten paar Wörter von \"Kitty Ipsum\", die du kopieren und an die richtige Stelle einfügen kannst: Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
"
]
},
{
"id": "bad87fed1348bd9aedf08833",
"title": "Delete HTML Elements",
"description": [
"Our phone doesn't have much vertical space.",
"Let's remove the unnecessary elements so we can start building our CatPhotoApp.",
"Delete your h1
element so we can simplify our view."
],
"tests": [
"assert(($(\"h1\").length == 0), 'message: Delete your h1
element.');",
"assert(($(\"h2\").length > 0), 'message: Leave your h2
element on the page.');",
"assert(($(\"p\").length > 0), 'message: Leave your p
element on the page.');"
],
"challengeSeed": [
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Borra elementos HTML", "descriptionEs": [ "Nuestro teléfono no tiene mucho espacio vertical.", "Eliminemos los elementos innecesarios para que empecemos a construir nuestra CatPhotoApp.", "Borra el elementoh1
para simplificar nuestra vista."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Entferne HTML Elemente",
"descriptionDe": [
"Lösche die Elemente h1
, damit wir etwas Ordnung schaffen.",
"Unser Smartphone hat nicht sehr viel vertikalen Raum.",
"Lass uns die unwichtigen Elemente entfernen, damit wir unsere CatPhotoApp bauen können."
]
},
{
"id": "bad87fee1348bd9aedf08803",
"title": "Change the Color of Text",
"description": [
"Now let's change the color of some of our text.",
"We can do this by changing the style
of your h2
element.",
"The style that is responsible for the color of an element's text is the \"color\" style.",
"Here's how you would set your h2
element's text color to blue:",
"<h2 style=\"color: blue\">CatPhotoApp</h2>
",
"Change your h2
element's style so that its text color is red."
],
"tests": [
"assert($(\"h2\").css(\"color\") === \"rgb(255, 0, 0)\", 'message: Your h2
element should be red.');"
],
"challengeSeed": [
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Cambia el color del texto", "descriptionEs": [ "Ahora cambiemos el color de parte de nuestro texto.", "Podemos hacer esto cambiando elstyle
del elemento h2
",
"El estilo responsable del color de texto de un elemento es el estilo \"color\".",
"Así es como podrías poner en azul el color de texto de tu elemento h2
:",
"<h2 style=\"color: blue\">CatPhotoApp</h2>
",
"Cambia el estilo del elemento h2
de manera que el color de su texto sea rojo."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Ändere die Farbe des Textes",
"descriptionDe": [
"Ändere den Style des h2
Elements, damit die Textfarbe Rot ist.",
"Wir können das bewerkstelligen, indem wir den \"style\" des h2
Elements ändern.",
"So könntest du die Textfarbe des h2
Elements in Blau ändern: <h2 style=\"color: blue\">CatPhotoApp</h2>
"
]
},
{
"id": "bad87fee1348bd9aedf08805",
"title": "Use CSS Selectors to Style Elements",
"description": [
"With CSS, there are hundreds of CSS properties
that you can use to change the way an element looks on your page.",
"When you entered <h2 style=\"color: red\">CatPhotoApp</h2>
, you were giving that individual h2
element an inline style
.",
"That's one way to add style to an element, but a better way is by using CSS
, which stands for Cascading Style Sheets
.",
"At the top of your code, create a style
element like this:",
"<style>
",
"</style>
",
"Inside that style element, you can create a CSS selector
for all h2
elements. For example, if you wanted all h2
elements to be red, your style element would look like this:",
"<style>
",
" h2 {color: red;}
",
"</style>
",
"Note that it's important to have both opening and closing curly braces ({
and }
) around each element's style. You also need to make sure your element's style is between the opening and closing style tags. Finally, be sure to add the semicolon to the end of each of your element's styles.",
"Delete your h2
element's style attribute and instead create a CSS style
element. Add the necessary CSS to turn all h2
elements blue."
],
"tests": [
"assert(!$(\"h2\").attr(\"style\"), 'message: Remove the style attribute from your h2
element.');",
"assert($(\"style\") && $(\"style\").length > 1, 'message: Create a style
element.');",
"assert($(\"h2\").css(\"color\") === \"rgb(0, 0, 255)\", 'message: Your h2
element should be blue.');",
"assert(code.match(/h2\\s*\\{\\s*color\\s*:.*;\\s*\\}/g), 'message: Ensure that your stylesheet h2
declaration is valid with a semicolon and closing brace.');",
"assert(code.match(/<\\/style>/g) && code.match(/<\\/style>/g).length === (code.match(/",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Utiliza una clase CSS para darle estilo a un elemento", "descriptionEs": [ "Las clases son estilos reutilizables que pueden añadirse a elementos HTML.", "Aquí esta un ejemplo de una declaración de una clase CSS:", "<style>
",
" .blue-text {
",
" color: blue;
",
" }
",
"</style>
",
"Puedes ver que hemos creado una clase CSS llamada \"blue-text\" dentro de la etiqueta <style>
",
"Puedes aplicar una clase a un elemento HTML de esta manera:",
"<h2 class=\"blue-text\">CatPhotoApp</h2>
",
"Nota que en tu elemento style
CSS, las clases deben comenzar con un punto. En los elementos HTML, las declaraciones de clase, NO deben comenzar con punto. ",
"En vez de de crear un nuevo elemento style
, intenta eliminar la declaración de estilo de h2
de tus elementos de estilo existentes y reemplazala por la declaración de clase .red-text
.",
"Crea una clase CSS llamada red-text
y aplicala a tu elemento h2
"
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Nutze eine CSS Klasse um ein Element zu gestalten",
"descriptionDe": [
"Erstelle eine CSS Klasse namens \"red-text\" und füge sie zu deinem h2
Element hinzu.",
"Klassen sind wiederverwendbare Styles, die HTML Elementen zugewiesen werden können.",
"So sieht eine CSS Klasse aus:",
"",
"Du siehst, dass wir die CSS Klasse \"blue-text\" innerhalb von <style>
geschrieben haben.",
"Du kannst eine Klasse folgendermaßen einem HTML Element beifügen: <h2 class=\"blue-text\">CatPhotoApp</h2>
",
"Beachte, dass Klassen in deinem CSS style
Element mit einem Punkt beginngen sollten. In deinen Klassen-Deklarationen von HTML Elementen sollten diese nicht mit einem Punkt beginnen.",
"Anstatt ein neues style
Element zu erstellen, versuche die h2
Style-Deklaration von deinem bereits bestehenden Style Element zu entfernen und sie mit der Klassen-Deklaration \".red-text\" zu ersetzen."
]
},
{
"id": "bad87fee1348bd9aefe08806",
"title": "Style Multiple Elements with a CSS Class",
"description": [
"Remember that you can attach classes to HTML elements by using class=\"your-class-here\"
within the relevant element's opening tag.",
"Remember that CSS class selectors require a period at the beginning like this:",
".blue-text {
",
" color: blue;
",
"}
",
"But also remember that class declarations don't use a period, like this:",
"<h2 class=\"blue-text\">CatPhotoApp<h2>
",
"Apply the red-text
class to your h2
and p
elements."
],
"tests": [
"assert($(\"h2\").css(\"color\") === \"rgb(255, 0, 0)\", 'message: Your h2
element should be red.');",
"assert($(\"h2\").hasClass(\"red-text\"), 'message: Your h2
element should have the class red-text
.');",
"assert($(\"p\").css(\"color\") === \"rgb(255, 0, 0)\", 'message: Your p
element should be red.');",
"assert($(\"p\").hasClass(\"red-text\"), 'message: Your p
element should have the class red-text
.');"
],
"challengeSeed": [
"",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Da estilo a múltiples elementos con una clase CSS", "descriptionEs": [ "Recuerda que puedes adjuntar clases a elementos HTML utilizandoclass=\"tu-clase-aqui\"
dentro de la etiqueta de apertura del elemento mismo.",
"Recuerda que los selectores de clase CSS requieren un punto al principio, así:",
".blue-text {
",
" color: blue;
",
"}
",
"Pero recuerda también que las declaraciones de clase en elementos NO llevan punto:",
"<h2 class=\"blue-text\">CatPhotoApp<h2>
",
"Aplica la clase red-text
a tus elementos h2
y p
"
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Gestalte mehrere Elemente mit einer CSS Klasse",
"descriptionDe": [
"Füge den h2
und p
Elementen die Klasse \"red-text\" hinzu.",
"Du kannst Klassen zu HTML Elementen hinzufügen, indem du zum Beispiel class=\"deine-klasse\"
innerhalb des öffnenden Tags schreibst.",
"Du weißt, es gehört ein Punkt vor CSS Klassen: .red-text { color: blue; }
. Aber diese Klassen-Deklarationen brauchen keinen Punkt: <h2 class=\"blue-text\">CatPhotoApp<h2>
"
]
},
{
"id": "bad87fee1348bd9aedf08806",
"title": "Change the Font Size of an Element",
"description": [
"Font size is controlled by the font-size
CSS property, like this:",
"h1 {
",
" font-size: 30px;
",
"}
",
"Create a second p
element with the following kitty ipsum text: Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
",
"Inside the same <style>
tag that we created for your red-text
class, set the font-size
of all p
elements to 16 pixels (16px
)."
],
"tests": [
"assert($(\"p\").length > 1, 'message: You need 2 p
elements with Kitty Ipsum text.');",
"assert(code.match(/<\\/p>/g) && code.match(/<\\/p>/g).length === code.match(/p elements has a closing tag.');",
"assert.isTrue((/Purr\\s+jump\\s+eat/gi).test($(\"p\").text()), 'message: Your p
element should contain the first few words of the provided additional kitty ipsum text
.');",
"assert($(\"p:eq(0)\").css(\"font-size\") === \"16px\" && $(\"p:eq(1)\").css(\"font-size\") === \"16px\", 'message: Give elements with the p
tag a font-size
of 16px
.')"
],
"challengeSeed": [
"",
"",
"
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Cambia el tamaño de fuente de un elemento.", "descriptionEs": [ "El tamaño de fuente es controlado por la propiedad CSS \"font-size\", como aquí:", "h1 {
",
" font-size: 30px;
",
"}
",
"Crea un segundo elemento p
con el siguiente texto kitty ipsum: Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
",
"Dentro de la misma etiqueta <style>
que creamos para tu clase red-text
, pon el font-size
de los elementos p
a 16 pixeles (16px
)."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Ändere die Schriftgröße eines Elements",
"descriptionDe": [
"Erstelle ein zweites p
Element. Ändere dann innerhalb deines <style>
Elements die Schriftgröße oder \"font-size\" von allen p
Elementen auf 16 Pixel.",
"Schriftgröße wird von dem CSS Attribut \"font-size\" kontrolliert: h1 { font-size: 30px; }
",
"Zuerst erstellst du ein zweites p
Element mit dem folgenden Kitty Ipsum Text: Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
",
"Versuche nun beiden p
Elementen die Schriftgröße von 16 Pixeln (16px
) zu geben. Du kannst das innerhalb des selben <style>
Tags machen, welches wir für deine \"red-text\" Klasse erstellt haben."
]
},
{
"id": "bad87fee1348bd9aede08807",
"title": "Set the Font Family of an Element",
"description": [
"You can set an element's font by using the font-family
property.",
"For example, if you wanted to set your h2
element's font to Sans-serif
, you would use the following CSS:",
"h2 {
",
" font-family: Sans-serif;
",
"}
",
"Make all of your p
elements use the Monospace
font."
],
"tests": [
"assert($(\"p\").css(\"font-family\").match(/monospace/i), 'message: Your p
elements should use the font Monospace
.');"
],
"challengeSeed": [
"",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
", "Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Establecer la familia del tipo de letra de un elemento", "descriptionEs": [ "Puedes establecer el tipo de letra de un elemento usando la propiedadfont-family
.",
"Por ejemplo, si quiere establecer el tipo de letra de su elemento h2
como Sans-serif
, use el siguiente CSS:",
"h2 {
",
" font-family: Sans-serif;
",
"}
",
"Haga que todos sus elementos p
utilicen el tipo de letra Monospace
."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Definiere die Schriftart eines Elements",
"descriptionDe": [
"Definiere für alle p
Elemente die Schriftart \"Monospace\".",
"Du kannst einem Element mit \"font-family\" eine Schriftart zuweisen.",
"Wenn du zum Beispiel deinem h2
Element die Schriftart \"Sans-serif\" zuweisen willst, kannst du das mit dem folgenden CSS tun: h2 { font-family: Sans-serif; }
"
]
},
{
"id": "bad87fee1348bd9aedf08807",
"title": "Import a Google Font",
"description": [
"Now, let's import and apply a Google font (note that if Google is blocked in your country, you will need to skip this challenge).",
"First, you'll need to make a call
to Google to grab the Lobster
font and load it into your HTML.",
"Copy the following code snippet and paste it into the top of your code editor:",
"<link href=\"http://fonts.googleapis.com/css?family=Lobster\" rel=\"stylesheet\" type=\"text/css\">
",
"Now you can set Lobster
as a font-family value on your h2
element.",
"Apply the font-family
of Lobster
to your h2
element."
],
"tests": [
"assert(new RegExp(\"googleapis\", \"gi\").test(code), 'message: Import the Lobster
font.');",
"assert($(\"h2\").css(\"font-family\").match(/lobster/i), 'message: Your h2
element should use the font Lobster
.');",
"assert($(\"p\").css(\"font-family\").match(/monospace/i), 'message: Your p
element should still use the font Monospace
.');"
],
"challengeSeed": [
"",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
", "Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Importar un tipo de letra de Google", "descriptionEs": [ "Ahora, importemos y apliquemos un tipo de letra de Google (tenga en cuenta que si Google es bloqueado en su país, debera saltarse este desafio).", "Primero, haga unllamado
a Google para tomar el tipo de letra Lobster
y para cargarlo en su HTML.",
"Copie la siguiente porción de código y péguela en la parte superior de su editor de texto:",
"<link href=\"http://fonts.googleapis.com/css?family=Lobster\" rel=\"stylesheet\" type=\"text/css\">
",
"Ahora establezca Lobster
como valor de font-family en su elemento h2
.",
"Aplique la familia de fuente (font-family
) Lobster
a su elemento h2
."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Importiere eine Google Font",
"descriptionDe": [
"Füge dem h2
Element die Schriftart oder font-family
\"Lobster\" hinzu.",
"Zuerst musst du Google Fonts in dein HTML einbinden, um auf \"Lobster\" zugreifen zu können.",
"Kopiere den folgenden Code und füge diesen in deinen Editor über dem style
Element ein:",
"<link href=\"http://fonts.googleapis.com/css?family=Lobster\" rel=\"stylesheet\" type=\"text/css\">
",
"Jetzt kannst du \"Lobster\" als font-family Attribut zu deinem h2
Element hinzufügen."
]
},
{
"id": "bad87fee1348bd9aedf08808",
"title": "Specify How Fonts Should Degrade",
"description": [
"There are several default fonts that are available in all browsers. These include Monospace
, Serif
and Sans-Serif
",
"When one font isn't available, you can tell the browser to \"degrade\" to another font.",
"For example, if you wanted an element to use the Helvetica
font, but also degrade to the Sans-Serif
font when Helvetica
wasn't available, you could use this CSS style:",
"p {
",
" font-family: Helvetica, Sans-Serif;
",
"}
",
"Now comment out your call to Google Fonts, so that the Lobster
font isn't available. Notice how it degrades to the Monospace
font."
],
"tests": [
"assert($(\"h2\").css(\"font-family\").match(/^\"?lobster/i), 'message: Your h2 element should use the font Lobster
.');",
"assert($(\"h2\").css(\"font-family\").match(/lobster.*,.*monospace/i), 'message: Your h2 element should degrade to the font Monospace
when Lobster
is not available.');",
"assert(new RegExp(\"\", \"gi\").test(code), 'message: Be sure to close your comment by adding -->
.');"
],
"challengeSeed": [
"",
"",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
", "Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Especifique como deben degradarse los tipos de letra", "descriptionEs": [ "Hay diversos tipos de letra disponibles por omisión en todos los navegadores. Estos incluyendMonospace
, Serif
y Sans-Serif
",
"Cuando un tipo de letra no está disponible, puede decirle al navegador que \"degrade\" a otro tipo de letra.",
"Por ejemplo, si quiere que un elemento use el tipo Helvetica
, o que se degrade a Sans-Serif
cuando Helvetica
no esté disponible, puede usar el siguiente estilo CSS:",
"p {
",
" font-family: Helvetica, Sans-Serif;
",
"}
",
"Ahora ponga como comentarios sus llamadas a tipos de letra de Google, de forma que el tipo Lobster
no esté disponible. Note como se degrada al tipo Monospace
."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Spezifiziere die Rangfolge von Schriftarten",
"descriptionDe": [
"Füge allen h2
Elementen die Schriftart \"Lobster\" hinzu und definiere \"Monospace\" als Ersatzschrift, wenn \"Lobster\" nicht verfügbar ist.",
"Du kannst \"Lobster\" als Schriftart deines h2
Elements belassen, aber gleichzeitig dafür sorgen, dass eine alternative Schrift geladen wird, wenn \"Lobster\" nicht zur Verfügung steht.",
"Wenn du zum Beispiel einem Element die Schriftart \"Helvetica\" geben möchtest, aber gleichzeitig die alternative Schrift \"Sans-Serif\" laden willst, wenn \"Helvetica\" nicht verfügbar ist, kannst du diesen CSS Style verwenden: p { font-family: Helvetica, Sans-Serif; }
",
"Es gibt verschiedene Schriftarten, die jedem Browser standardmäßig zur Verfügung stehen. Das sind unter anderem \"Monospace\", \"Serif\" und \"Sans-Serif\". Probiere deinem h2
Element gleichzeitig die Schriftart \"Lobster\" und als Alternative \"Monospace\" zu geben.",
"Jetzt versuche den Aufruf von Google Fonts in deinem HTML auszukommentieren, sodass \"Lobster\" nicht zur Verfügung steht. Beachte, wie nun die Schriftart \"Monospace\" geladen wird."
]
},
{
"id": "bad87fee1348bd9aedf08812",
"title": "Add Images to your Website",
"description": [
"You can add images to your website by using the img
element, and point to a specific image's URL using the src
attribute.",
"An example of this would be:",
"<img src=\"http://www.your-image-source.com/your-image.jpg\">
",
"Note that in most cases, img
elements are self-closing.",
"Try it with this image:",
"https://bit.ly/fcc-relaxing-cat
"
],
"tests": [
"assert($(\"img\").length > 0, 'message: Your page should have an image element.');",
"assert(new RegExp(\"\\/\\/bit.ly\\/fcc-relaxing-cat\", \"gi\").test($(\"img\").attr(\"src\")), 'message: Your image should have a src
attribute that points to the kitten image.');"
],
"challengeSeed": [
"",
"",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
", "Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Añade imágenes a tu sitio web", "descriptionEs": [ "Puedes agregar imágenes a tu sitio web mediante el uso del elementoimg
, y apuntar a la URL específica de una imagen utilizando el atributo src
.",
"Un ejemplo de esto sería:",
"
",
"Ten en cuenta que en la mayoría de los casos, los elementos img
son de cierre automático.",
"Prueba con esta imagen:",
"https://bit.ly/fcc-relaxing-cat
"
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Füge Bilder zu deiner Website hinzu",
"descriptionDe": [
"Nutze ein img
Element um das Bild https://bit.ly/fcc-relaxing-cat
einzufügen.",
"Du kannst img
Elemente verwenden, um Bilder in deine Website einzubauen. Um zur URL des Bildes zu verweisen, benutzt du das src
Attribut.",
"Ein Beispiel dafür wäre <img src=\"www.bild-quelle.com/bild.jpg\"/>
. Beachte, dass img
Elemente in den meisten Fällen selbstschließend sind.",
"Versuche es mit diesem Bild: https://bit.ly/fcc-relaxing-cat
"
]
},
{
"id": "bad87fee1348bd9acdf08812",
"title": "Size your Images",
"description": [
"CSS has a property called width
that controls an element's width. Just like with fonts, we'll use px
(pixels) to specify the image's width.",
"For example, if we wanted to create a CSS class called larger-image
that gave HTML elements a width of 500 pixels, we'd use:",
"<style>
",
" .larger-image {
",
" width: 500px;
",
" }
",
"</style>
",
"Create a class called smaller-image
and use it to resize the image so that it's only 100 pixels wide."
],
"tests": [
"assert($(\"img\").hasClass(\"smaller-image\"), 'message: Your img
element should have the class smaller-image
.');",
"assert($(\"img\").width() === 100, 'message: Your image should be 100 pixels wide.');"
],
"challengeSeed": [
"",
"",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
", "Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Da tamaño a tus imágenes", "descriptionEs": [ "CSS tiene una propiedad llamadawidth
que controla el ancho de un elemento. Al igual que con los tipos de letra, usaremos px
(píxeles) para especificar el ancho de la imagen. ",
"Por ejemplo, si queremos crear una clase CSS llamada larger-image
que le de a los elementos HTML un ancho de 500 píxeles, usaríamos:",
"<estilo>
",
" .larger-image{
",
" width: 500px;
",
" }
",
"</style>
",
"Crea una clase llamada smaller-image
y utilízala para cambiar el tamaño de la imagen de modo que sea de sólo 100 píxeles de ancho."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Skaliere deine Bilder",
"descriptionDe": [
"Erstelle eine Klasse mit dem Namen smaller-image
und verwende sie, um dein Bild auf 100 Pixel zu skalieren.",
"Die Breite eines Elements wird mit dem CSS Attribut width
kontrolliert. Wie bei Schriftarten verwenden wir Pixel (px) um die Größe zu definieren.",
"Wenn wir also die CSS Klasse \"larger-image\" erstellen wollen, um HTML Elementen eine Breite von 500 Pixeln zu verleihen, verwenden wir: <style> .larger-image { width: 500px; } </style>
"
]
},
{
"id": "bad87fee1348bd9bedf08813",
"title": "Add Borders Around your Elements",
"description": [
"CSS borders have properties like style
, color
and width
",
"For example, if we wanted to create a red, 5 pixel border around an HTML element, we could use this class:",
"<style>
",
" .thin-red-border {
",
" border-color: red;
",
" border-width: 5px;
",
" border-style: solid;
",
" }
",
"</style>
",
"Create a class called thick-green-border
that puts a 10-pixel-wide green border with a style of solid
around an HTML element, and apply that class to your cat photo.",
"Remember that you can apply multiple classes to an element by separating each class with a space within its class
attribute. For example:",
"<img class=\"class1 class2\">
"
],
"tests": [
"assert($(\"img\").hasClass(\"smaller-image\"), 'message: Your img
element should have the class smaller-image
.');",
"assert($(\"img\").hasClass(\"thick-green-border\"), 'message: Your img
element should have the class thick-green-border
.');",
"assert($(\"img\").hasClass(\"thick-green-border\") && parseInt($(\"img\").css(\"border-top-width\"), 10) >= 8 && parseInt($(\"img\").css(\"border-top-width\"), 10) <= 12, 'message: Give your image a border width of 10px
.');",
"assert($(\"img\").css(\"border-right-style\") === \"solid\", 'message: Give your image a border style of solid
.');",
"assert($(\"img\").css(\"border-left-color\") === \"rgb(0, 128, 0)\", 'message: The border around your img
element should be green.');"
],
"challengeSeed": [
"",
"",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
", "Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Añade bordes alrededor de tus elementos", "descriptionEs": [ "Los bordes CSS tienen propiedades comostyle
, color
y width
",
"Por ejemplo, si queremos crear un borde de 5 píxeles rojo alrededor de un elemento HTML, podríamos utilizar esta clase:",
"<style>
",
" .thin-red-border {
",
" border-color: red;
",
" border-width: 5px;
",
" border-style: solid;
",
" }
",
"</style>
",
"Crea una clase llamada thick-green-border
que ponga un borde verde de 10 píxeles de ancho con un estilo de solid
en torno a un elemento HTML, y aplica esa clase a tu foto del gato. ",
"Recuerda que puedes aplicar múltiples clases a un elemento separando una clase de otra con un espacio. Haces esto dentro de tu atributo class
. Por ejemplo:",
"<img class=\"class1 class2\">
"
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Füge Rahmen zu deinen Elementen hinzu",
"descriptionDe": [
"Erstelle die Klasse \"thick-green-border\", welche einen 10 Pixel dicken, grünen Rahmen mit dem Style \"solid\" um ein HTML Element setzt. Füge diese Klasse zu deinem Katzenfoto hinzu.",
"CSS Rahmen haben Attribute wie Style, Color und Width.",
"Wenn wir nun einen roten, 5 Pixel dicken Rahmen um ein HTML Element setzen wollen, würden wir so vorgehen: <style> .thin-red-border { border-color: red; border-width: 5px; border-style: solid; } </style>
"
]
},
{
"id": "bad87fee1348bd9aedf08814",
"title": "Add Rounded Corners with a Border Radius",
"description": [
"Your cat photo currently has sharp corners. We can round out those corners with a CSS property called border-radius
.",
"You can specify a border-radius
with pixels. This will affect how rounded the corners are. Add this property to your thick-green-border
class and set it to 10px
.",
"Give your cat photo a border-radius
of 10px
."
],
"tests": [
"assert($(\"img\").hasClass(\"thick-green-border\"), 'message: Your image element should have the class \"thick-green-border\".');",
"assert(parseInt($(\"img\").css(\"border-top-left-radius\")) > 8, 'message: Your image should have a border radius of 10px
');"
],
"challengeSeed": [
"",
"",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
", "Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Añade bordes alrededor de tus elementos", "descriptionEs": [ "Los bordes CSS tienen propiedades comostyle
, color
y width
",
"Por ejemplo, si queremos crear un borde de 5 píxeles rojo alrededor de un elemento HTML, podríamos utilizar esta clase:",
"<style>
",
" .thin-red-border {
",
" border-color: red;
",
" border-width: 5px;
",
" border-style: solid;
",
" }
",
"</style>
",
"Crea una clase llamada thick-green-border
que ponga un borde verde de 10 píxeles de ancho con un estilo de solid
en torno a un elemento HTML, y aplica esa clase a tu foto del gato. ",
"Recuerda que puedes aplicar múltiples clases a un elemento separando una clase de otra con un espacio. Haces esto dentro de tu atributo class
. Por ejemplo:",
"<img class=\"class1 class2\">
"
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Füge abgerundete Ecken mit Border Radius hinzu",
"descriptionDe": [
"Gib deinem Katzenbild einen border-radius
von 10 Pixeln.",
"Das Bild hat nun spitze Ecken. Wir können diese Ecken mit dem CSS Attribut border-radius
abrunden.",
"Du kannst einen border-radius
mit Pixeln deklarieren. Das beeinflusst die Rundung der Ecken. Füge dieses Attribut zu deiner thick-green-border
Klasse hinzu und setze es auf 10 Pixel."
]
},
{
"id": "bad87fee1348bd9aedf08815",
"title": "Make Circular Images with a Border Radius",
"description": [
"In addition to pixels, you can also specify a border-radius
using a percentage.",
"Give your cat photo a border-radius
of 50%
."
],
"tests": [
"assert(parseInt($(\"img\").css(\"border-top-left-radius\")) > 48, 'message: Your image should have a border radius of 50%
, making it perfectly circular.');",
"assert(code.match(/50%/g), 'message: Be sure to use a percentage instead of a pixel value.');"
],
"challengeSeed": [
"",
"",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
", "Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Añade esquinas redondeadas con un radio de borde", "descriptionEs": [ "Tu foto del gato actualmente tiene esquinas cuadradas. Podemos redondear esas esquinas con una propiedad CSS llamadaborder-radius
. ",
"Puedes especificar un border-radius
en píxeles. Esto afectará lo redondeadas de las esquinas. Añade esta propiedad a tu clase thick-green-border
y establecela a 10px
. ",
"Dale a tu foto del gato un border-radius
de 10px
."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Erstelle runde Bilder mit einem Border Radius",
"descriptionDe": [
"Gib deinem Katzenfoto einen border-radius
von 50 %.",
"Du kannst einem border-radius
neben Pixeln auch Prozentwerte zuweisen."
]
},
{
"id": "bad87fee1348bd9aedf08816",
"title": "Link to External Pages with Anchor Elements",
"description": [
"a
elements, also known as anchor
elements, are used to link to content outside of the current page.",
"Here's a diagram of an a
element. In this case, the a
element is used in the middle of a paragraph element, which means the link will appear in the middle of a sentence.",
"",
"Here's an example:",
"<p>Here's a <a href=\"http://freecodecamp.com\"> link to Free Code Camp</a> for you to follow.</p>
",
"Create an a
element that links to http://freecatphotoapp.com
and has \"cat photos\" as its anchor text
."
],
"tests": [
"assert((/cat photos/gi).test($(\"a\").text()), 'message: Your a
element should have the anchor text
of \"cat photos\".');",
"assert(/http:\\/\\/freecatphotoapp\\.com/gi.test($(\"a\").attr(\"href\")), 'message: You need an a
element that links to http://freecatphotoapp.com
');",
"assert(code.match(/<\\/a>/g) && code.match(/<\\/a>/g).length === code.match(/a element has a closing tag.');"
],
"challengeSeed": [
"",
"",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
", "Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Enlaza páginas externas con elementos ancla", "descriptionEs": [ "Los elementosa
, también conocido como elementos ancla
, se utilizan para enlazar a contenido fuera de la página actual.",
"Aquí está un diagrama de un elemento a
. En este caso, el elemento a
se utiliza en el medio de un elemento de párrafo, lo que significa que el enlace aparecerá en el medio de una frase. ",
" ",
"He aquí un ejemplo:",
"<p>Aquí está un <a href=\"http://freecodecamp.com\"> enlace a Free Code Camp</a> para que lo siga.</p>
",
"Crea un elemento a
que se vincule a http://freecatphotoapp.com
y tenga como texto de anclaje
\" fotos de gatos\"."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Verlinke externe Seiten mit Anker Elementen",
"descriptionDe": [
"Erstelle ein a
Element oder \"Anker Element\", das auf http://freecatphotoapp.com verlinkt und den Link-Text \"cat photos\" oder \"anchor text\" beinhaltet.",
"So sieht ein a
Element aus. In diesem Fall wird es innerhalb eines Paragraphen Elements verwendet. Das bedeutet dein Link wird innerhalb des Satzes erscheinen.",
"",
"Hier ist ein Beispiel: <p>Hier ist ein <a href=\"http://freecodecamp.com\"> Link zum Free Code Camp</a> für dich zum Folgen.</p>
"
]
},
{
"id": "bad87fee1348bd9aede08817",
"title": "Nest an Anchor Element within a Paragraph",
"description": [
"Again, here's a diagram of an a
element for your reference:",
"",
"Here's an example:",
"<p>Here's a <a href=\"http://freecodecamp.com\"> link to Free Code Camp</a> for you to follow.</p>
",
"Nesting
just means putting one element inside of another element.",
"Now nest your existing a
element within a new p
element (just after the existing h2
element) so that the surrounding paragraph says \"View more cat photos\", but where only \"cat photos\" is a link, and the rest of the text is plain text."
],
"tests": [
"assert($(\"a[href=\\\"http://www.freecatphotoapp.com\\\"]\").length > 0, 'message: You need an a
element that links to \"http://www.freecatphotoapp.com\".');",
"assert($(\"a\").text().match(/cat\\sphotos/gi), 'message: Your a
element should have the anchor text of \"cat photos\"');",
"assert($(\"p\") && $(\"p\").length > 2, 'message: Create a new p
element around your a
element.');",
"assert($(\"a[href=\\\"http://www.freecatphotoapp.com\\\"]\").parent().is(\"p\"), 'message: Your a
element should be nested within your new p
element.');",
"assert($(\"a[href=\\\"http://www.freecatphotoapp.com\\\"]\").parent().text().match(/^\\s*View\\smore\\s/gi), 'message: Your p
element should have the text \"View more \" (with a space after it).');",
"assert(!$(\"a\").text().match(/View\\smore/gi), 'message: Your a
element should not have the text \"View more\".');",
"assert(code.match(/<\\/p>/g) && code.match(//g).length === code.match(/
p elements has a closing tag.');",
"assert(code.match(/<\\/a>/g) && code.match(//g).length === code.match(/a elements has a closing tag.');"
],
"challengeSeed": [
"",
"",
"",
"CatPhotoApp
",
"",
"cat photos",
"",
"",
"",
"
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
", "Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Anida un elemento de anclaje dentro de un párrafo", "descriptionEs": [ "Una vez más, aquí está un diagrama de un elementoa
para tu referencia:",
"",
"He aquí un ejemplo:",
"<p>Aquí un <a href=\"http://freecodecamp.com\"> enlace a Free Code Camp</a> para que lo sigas.</p>
",
"anidamiento
significa poner un elemento dentro de otro elemento.",
"Ahora anida el elemento a
existente dentro de un nuevo elemento p
para que el párrafo que lo rodee diga \"View more cat photos\", pero donde sólo \"cat photos\" sea un enlace, y el resto sea texto plano ."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint Umschließe ein Anker Element mit einem Paragraphen",
"descriptionDe":[
"Jetzt umschließe dein a
Element mit einem p
Element und dem Text \"click here for cat photos\". Nur \"cat photos\" soll ein Link ein – der Rest normaler Text.",
"Hier ist nochmal ein Beispiel für ein a
Element: ",
"So könnte es aussehen: <p>Hier ist ein <a href=\"http://freecodecamp.com\"> Link zum Free Code Camp</a> für dich zum Folgen.</p>
"
]
},
{
"id": "bad87fee1348bd9aedf08817",
"title": "Make Dead Links using the Hash Symbol",
"description": [
"Sometimes you want to add a
elements to your website before you know where they will link.",
"This is also handy when you're changing the behavior of a link using jQuery
, which we'll learn about later.",
"Replace the value of your a
element's href
attribute with a #
, also known as a hash symbol, to turn it into a dead link."
],
"tests": [
"assert($(\"a\").attr(\"href\") === \"#\", 'message: Your a
element should be a dead link with a href
attribute set to \"#\".');"
],
"challengeSeed": [
"",
"",
"",
"Click here for cat photos.
", "", "", "", "Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
", "Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Haz vínculos muertos utilizando el símbolo de numero", "descriptionEs": [ "A veces quieres agregar elementosa
a tu sitio web antes de saber qué enlazarán.",
"Esto también es útil cuando estás cambiando el comportamiento de un enlace usando jQuery
, que aprenderemos más adelante.",
"Reemplaza el atributo href
de tu elemento a
con un #
, también conocido como un símbolo de número o de hash, para convertirlo en un vínculo muerto."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Erstelle tote Links mit dem Hash Symbol",
"descriptionDe": [
"Nutze das Hash Symbol (#) um deine a
Elemente zu toten Links zu machen.",
"Manchmal wirst du a
Elemente zu deiner Website hinzufügen möchten, ohne dass du das Ziel des Links kennst.",
"Das ist auch nützlich, wenn du die Funktion eines Links mit jQuery
verändern willst. Das werden wir noch behandeln.",
"Ersetze den Inhalt des href
Attributs deines a
Elements mit einem Hash Symbol um einen toten Link zu erzeugen."
]
},
{
"id": "bad87fee1348bd9aedf08820",
"title": "Turn an Image into a Link",
"description": [
"You can make elements into links by nesting them within an a
element.",
"Nest your image within an a
element. Here's an example:",
"<a href=\"#\"><img src=\"http://bit.ly/fcc-running-cats\"/></a>
",
"Remember to use #
as your a
element's href
property in order to turn it into a dead link.",
"Once you've done this, hover over your image with your cursor. Your cursor's normal pointer should become the link clicking pointer. The photo is now a link."
],
"tests": [
"assert($(\"a\").children(\"img.smaller-image\").length > 0, 'message: Nest the existing img
element within an a
element.');",
"assert(new RegExp(\"#\").test($(\"a\").children(\"img\").parent().attr(\"href\")), 'message: Your a
element should be a dead link with a href
attribute set to #
.');",
"assert(code.match(/<\\/a>/g) && code.match(//g).length === code.match(/a elements has a closing tag.');"
],
"challengeSeed": [
"",
"",
"",
"Click here for cat photos.
", "", "", "", "Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
", "Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Convierte una imagen en un vínculo", "descriptionEs": [ "Puedes convertir elementos en enlaces al anidarlos con un elementoa
.",
"Anida tu imagen dentro de un elemento a
. He aquí un ejemplo: ",
"<a href=\"#\"><img src=\"http://bit.ly/fcc-running-cats\"/></a>
",
"Recuerda usar #
como atributo href
de tu elmento a
con el fin de convertirlo en un vínculo muerto.",
"Una vez hayas hecho esto, coloca el cursor sobre tu imagen. El puntero normal de tu cursor debería convertirse en el puntero de enlace. La foto es ahora un vínculo ."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Verlinke ein Bild",
"descriptionDe": [
"Umschließe dein img
Element mit einem a
Element als toten Link.",
"Du kannst jedes Element in einen Link verwandeln, indem du es mit einem a
Element umschließt.",
"Umschließe nun dein Bild mit einem a
Element. Hier ist ein Beispiel: <a href=\"#\"><img src=\"http://bit.ly/fcc-running-cats\"/></a>
",
"Vergewissere dich, dass du ein Hash Symbol (#) innerhalb des href
Attributs des a
Elements nutzt, um daraus einen toten Link zu machen.",
"Sobald du das gemacht hast, kannst du mit der Maus über dein Bild fahren. Der normale Mauszeiger sollte nun zu einer Hand für Links werden. Das Bild ist jetzt ein Link."
]
},
{
"id": "bad87fee1348bd9aedf08818",
"title": "Add Alt Text to an Image for Accessibility",
"description": [
"alt
attributes, also known as alt text
, are what browsers will display if they fail to load the image. alt
attributes are also important for blind or visually impaired users to understand what an image portrays. And search engines also look at alt
attributes.",
"In short, every image should have an alt
attribute!",
"You can add an alt
attribute right in the img element like this:",
"<img src=\"www.your-image-source.com/your-image.jpg\" alt=\"your alt text\">
",
"Add an alt
attribute with the text A cute orange cat lying on its back
to our cat photo."
],
"tests": [
"assert($(\"img\").filter(function(){ return /cat/gi.test(this.alt) }).length > 0, 'message: Your image element should have an alt
attribute set to A cute orange cat lying on its back
');"
],
"challengeSeed": [
"",
"",
"",
"Click here for cat photos.
", "", "", "", "Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
", "Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Agrega texto alternativo a una imagen para dar Accesibilidad", "descriptionEs": [ "Los atributosalt
también conocidos como texto alternativo
, son lo que se presentarán en caso que el navegador no puede mostrar la imagen. Los atributos alt
también son importantes para los usuarios ciegos o con deficiencia visual para entender lo que una imagen retrata. Y los motores de búsqueda también examinan los atributos alt
. ",
"En resumen, ¡cada imagen debe tener un atributo alt
!",
"Usted puede agregar un atributo alt
justo en el elemento img
así:",
"<img src=\"www.your-image-source.com/your-image.jpg\" alt=\"tu texto alternativo\">
",
"Añade un atributo alt
con el texto A cute orange cat lying on its back
a nuestra foto del gato."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Füge Alt Text für mehr Barrierefreiheit hinzu",
"descriptionDe": [
"Füge zu unserem Katzen-Bild ein alt
Attribut mit dem Text \"A cute orange cat lying on its back\" hinzu.",
"alt
Attribute – auch \"Alt Text\" genannt – werden vom Browser angezeigt, wenn sie ein Bild nicht laden können. Für blinde oder visuell eingeschränkte Menschen sind sie ebenfalls wichtig um zu verstehen, was ein Bild darstellt. Zudem werden diese Texte von Suchmaschinen genutzt.",
"Kurz gesagt: Jedes Bild sollte ein alt
Attribut beinhalten!",
"alt
Attribute sind nützlich um Personen – und Web Crawlers wie Google – zu sagen was in einem Foto abgebildet wird. Das ist extrem wichtig, damit blinde oder visuell eingeschränkte Menschen den Inhalt der Website verstehen.",
"Du kannst das alt
Attribut direkt in das Img Element einfügen: <img src=\"www.bild-quelle.com/bild.jpg\" alt=\"Dein Alt Text.\"/>
"
]
},
{
"id": "bad87fee1348bd9aedf08827",
"title": "Create a Bulleted Unordered List",
"description": [
"HTML has a special element for creating unordered lists
, or bullet point-style lists.",
"Unordered lists start with a <ul>
element. Then they contain some number of <li>
elements.",
"For example: ",
"<ul>
",
" <li>milk</li>
",
" <li>cheese</li>
",
"</ul>
",
"would create a bullet point-style list of \"milk\" and \"cheese\".",
"Remove the last two p
elements and create an unordered list of three things that cats love at the bottom of the page."
],
"tests": [
"assert($(\"ul\").length > 0, 'message: Create a ul
element.');",
"assert($(\"ul li\").length > 2, 'message: You should have three li
elements within your ul
element.');",
"assert(code.match(/<\\/ul>/gi) && code.match(/li
elements have closing tags.');"
],
"challengeSeed": [
"",
"",
"",
"Click here for cat photos.
", "", "", "", "Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
", "Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Crea una lista no ordenada con viñetas", "descriptionEs": [ "HTML tiene un elemento especial para la creación delistas no ordenadas
, o listas con estilo viñeta.",
"Las listas no ordenadas comienzan con un elemento <ul>
. A continuación contienen una cantidad de elementos <li>.
",
"Por ejemplo: ",
"<ul>
",
" <li>leche</li>
",
" <li>queso</li>
",
"</ul>
",
"creará una lista con viñetas con \"leche\" y \"queso\".",
"Elimina los dos últimos elementos p
y en la parte inferior de la página crea una lista no ordenada de tres cosas que los gatos aman."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Erstelle eine ungeordnete Liste",
"descriptionDe": [
"Ersetze deine p
Elemente mit drei Dingen, die Katzen lieben – in einer ungeordneten Liste.",
"HTML hat ein spezielles Element zum Erstellen von ungeordneten Listen.",
"ungeordnete Listen starten mit einem <ul>
Element. Dann beinhalten sie eine gewisse Anzahl an <li>
Elementen.",
"Als Beispiel: <ul><li>Milch</li><li>Käse</li></ul>
würde eine ungeordnete Liste für \"Milch\" und \"Käse\" erstellen."
]
},
{
"id": "bad87fee1348bd9aedf08828",
"title": "Create an Ordered List",
"description": [
"HTML has a special element for creating ordered lists
, or numbered-style lists.",
"Ordered lists start with a <ol>
element. Then they contain some number of <li>
elements.",
"For example:",
"<ol>
",
" <li>Garfield</li>
",
" <li>Sylvester</li>
",
"</ol>
",
"would create a numbered list of \"Garfield\" and \"Sylvester\".",
"Create an ordered list of the top 3 things cats hate the most."
],
"tests": [
"assert($(\"ul\").length > 0, 'message: You should have an ul
element on your page.');",
"assert($(\"ol\").length > 0, 'message: You should have an ol
element on your page.');",
"assert($(\"ul li\").length > 2, 'message: You should have three li
elements within your ul
element.');",
"assert($(\"ol li\").length > 2, 'message: You should have three li
elements within your ol
element.');",
"assert(code.match(/<\\/ul>/g) && code.match(/<\\/ul>/g).length === code.match(/ul
element has a closing tag.');",
"assert(code.match(/<\\/ol>/g) && code.match(/<\\/ol>/g).length === code.match(/ol
element has a closing tag.');",
"assert(code.match(/<\\/li>/g) && code.match(/li
element has a closing tag.');"
],
"challengeSeed": [
"",
"",
"",
"Click here for cat photos.
", "", "", "", "Things cats love:
", "Top 3 things cats hate:
" ], "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], "nameFr": "", "descriptionFr": [], "nameRu": "", "descriptionRu": [], "nameEs": "Crear una lista ordenada", "descriptionEs": [ "HTML tiene un elemento especial para la creación delistas ordenadas
, o listas de estilo numerado.",
"Las listas ordenadas comienzan con un elemento <ol>
. Luego contienen un número de elementos <li>.
",
"Por ejemplo:",
"<ol>
",
" <li>Garfield</li>
",
" <li>Sylvester</li>
",
"</ol>
",
"creará una lista numerada con \"Garfield\" y \"Sylvester\".",
"Crea una lista ordenada de los 3 cosas que más odian los gatos."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Erstelle eine geordnete Liste",
"descriptionDe": [
"Erstelle eine geordnete Liste von den drei Dingen, die Katzen am meisten hassen.",
"HTML beinhaltet ein spezielles Element für geordnete Listen.",
"Geordnete Listen starten mit einem <ol>
Element. Dann enthalten sie eine gewisse Anzahl an <li>
Elementen.",
"Als beispiel: <ol><li>hydrogen</li><li>Helium</li></ol>
würde eine nummerierte Liste aus \"Hydrogen\" und \"Helium\" erstellen."
]
},
{
"id": "bad87fee1348bd9aedf08829",
"title": "Create a Text Field",
"description": [
"Now let's create a web form.",
"Text inputs are a convenient way to get input from your user.",
"You can create one like this:",
"<input type=\"text\">
",
"Note that input
elements are self-closing.",
"Create an input
element of type text
below your lists."
],
"tests": [
"assert($(\"input[type=text]\").length > 0, 'message: Your app should have an input
element of type text
.');"
],
"challengeSeed": [
"",
"",
"",
"Click here for cat photos.
", "", "", "", "Things cats love:
", "Top 3 things cats hate:
", "<input type=\"text\">
",
"Tenga en cuenta que los elementos input
son de cierre automático.",
"Crea un elemento input
de tipo texto
debajo de tus listas."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Erstelle ein Textfeld",
"descriptionDe": [
"Nun erstellen wir ein Web Formular. Erstelle ein Textfeld unter deinen Listen.",
"Eingabefelder sind ein guter Weg, um Daten von Nutzern zu erhalten.",
"So kannst du eines erstellen: <input type=\"text\">
. Beachte, dass input
Elemente selbstschließend sind."
]
},
{
"id": "bad87fee1348bd9aedf08830",
"title": "Add Placeholder Text to a Text Field",
"description": [
"Your placeholder text is what appears in your text input
before your user has inputed anything.",
"You can create placeholder text like so:",
"<input type=\"text\" placeholder=\"this is placeholder text\">
",
"Set the placeholder
value of your text input
to \"cat photo URL\"."
],
"tests": [
"assert($(\"input[placeholder]\").length > 0, 'message: Add a placeholder
attribute text input
element.');",
"assert($(\"input\") && $(\"input\").attr(\"placeholder\") && $(\"input\").attr(\"placeholder\").match(/cat\\s+photo\\s+URL/gi), 'message: Set the value of your placeholder attribute to \"cat photo URL\".');"
],
"challengeSeed": [
"",
"",
"",
"Click here for cat photos.
", "", "", "", "Things cats love:
", "Top 3 things cats hate:
", "<input type=\"text\" placeholder=\"este es un texto de relleno\">
",
"Establece el valor del texto de relleno
de tu campo de texto como \"cat photo URL\"."
],
"namePt": "",
"descriptionPt": [],
"nameDe": "Waypoint: Füge Platzhalter zu einem Textfeld hinzu",
"descriptionDe": [
"Setze bei deinem input
Element den Wert für placeholder
auf \"cat photo URL\".",
"Platzhalter erscheinen in input
Feldern, bevor der Nutzer etwas eingibt.",
"Du kannst Platzhalter auf folgende Weise erstellen: <input type=\"text\" placeholder=\"Das ist ein Platzhalter.\">
"
]
},
{
"id": "bad87fee1348bd9aede08830",
"title": "Create a Form Element",
"description": [
"You can build web forms that actually submit data to a server using nothing more than pure HTML. You can do this by specifying an action on your form
element.",
"For example:",
"<form action=\"/url-where-you-want-to-submit-form-data\"></form>
",
"Nest your text field in a form
element. Add the action=\"/submit-cat-photo\"
attribute to this form element."
],
"tests": [
"assert($(\"form\") && $(\"form\").children(\"input\") && $(\"form\").children(\"input\").length > 0, 'message: Nest your text input element within a form
element.');",
"assert($(\"form\").attr(\"action\") === \"/submit-cat-photo\", 'message: Make sure your form
has an action
attribute which is set to /submit-cat-photo
');",
"assert(code.match(/<\\/form>/g) && code.match(/