Your image element must have an alt attribute

Your image element must have an alt attribute.

Your code so far


<img src=https://bit.ly/fcc-relaxing-cat alt=relaxing cat>
<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>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/add-images-to-your-website

@somed, revisit the lesson and see how alt text is formatted.

Please, next time ask a question instead of just posting code and expecting people to guess what it is you need help with.

1 Like

Tell us what’s happening:

Your code so far


<img src=https://bit.ly/fcc-relaxing-cat alt=relaxing cat>
<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>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/add-images-to-your-website

It’s recommended to use quotes in HTML and it’s necessary to use quotes when there’s a space like there is with relaxing cat so for that it would be necessary to put it between quotes.

Notice how the word cat is in blue like the other attributes, src and alt. You write the name of the attribute and then its value (name = “value”) and a space is used to separate it so when you put a space there after relaxing it would expect cat is another attribute.

2 Likes