Replaced 3rd grammatical person for 2nd, as it's more appropiate in spanish. Changed 'apuntar' for the more widely used 'redirigir' when referring to a hyperlink's actions. Transalated the titles. Made an estylistic change in the 1rst paragraph of the description.
2.9 KiB
2.9 KiB
id, title, challengeType, videoUrl, localeTitle
| id | title | challengeType | videoUrl | localeTitle |
|---|---|---|---|---|
| bad87fee1348bd9aedf08812 | Add Images to Your Website | 0 | Añadir imágenes a su sitio web |
Descripción
img y redirigir a la URL de una imagen específica usando el atributo src . Un ejemplo de esto sería: <img src="https://www.your-image-source.com/your-image.jpg"> Ten en cuenta que los elementos img se cierran automáticamente. Todos los elementos img deben tener un atributo alt . El texto dentro de un atributo alt se usa para que los lectores de pantalla mejoren la accesibilidad y se muestra si la imagen no carga. Nota: si la imagen sólo es decorativa usar un atributo alt vacío es una buena práctica. Idealmente, el atributo alt no debe contener caracteres especiales a menos que sea necesario. Agreguemos un atributo alt a nuestro ejemplo de img anterior: <img src="https://www.your-image-source.com/your-image.jpg" alt="Author standing on a beach with two thumbs up."> Instrucciones
img, antes del elemento h2 . Ahora establezca el atributo src para que redirija a esta url: https://bit.ly/fcc-relaxing-cat Finalmente, no te olvides de darle a tu imagen un texto alt . Tests
tests:
- text: Tu página debe tener un elemento de imagen.
testString: 'assert($("img").length > 0, "Your page should have an image element.");'
- text: Tu imagen debe tener un atributo <code>src</code> que apunte a la imagen del gatito.
testString: 'assert(new RegExp("\/\/bit.ly\/fcc-relaxing-cat|\/\/s3.amazonaws.com\/freecodecamp\/relaxing-cat.jpg", "gi").test($("img").attr("src")), "Your image should have a <code>src</code> attribute that points to the kitten image.");'
- text: Tu elemento de imagen <strong>debe</strong> tener un atributo <code>alt</code> .
testString: 'assert(code.match(/alt\s*?=\s*?(\"|\").*(\"|\")/), "Your image element <strong>must</strong> have an <code>alt</code> attribute.");'
Challenge Seed
<h2>CatPhotoApp</h2>
<main>
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main>
Solución
// solution required