Adding images to a website

Tell us what’s happening:
I am trying to add an emage but am getting the followin errors when I test the code
Your page should have an image element.

Error :Your image should have a src attribute that points to the kitten image.

Error: Your image element’s alt attribute should not be empty.

Your code so far


<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>
<img src= "https://bit.ly/fcc-relaxing-cat> alt="A business cat wearing a necktie.">
<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:81.0) Gecko/20100101 Firefox/81.0.

Challenge: Add Images to Your Website

Link to the challenge:

OK. here is the correct implementation A business cat wearing a necktie..

Hi could you let me know where I’ve gone wrong in the html code please?

Thanks

There is noting you did wrong you only miss the ". put this " at the end if the url in src

you have missed the " at the end of the src, then thete is an extra >

Hi @tmenz ,

<img src= "https://bit.ly/fcc-relaxing-cat> alt=“A business cat wearing a necktie.”>

At the end of the src link, you forget to close the quote marks.

CatPhotoApp

<img src= "https://www.freecatphotoapp.com/your-imge.jpg alt=“a cat relaxing.”>

still not getting the image

Hi This is still not working.Please help

CatPhotoApp

<img src= "https://www.freecatphotoapp.com/your-imge.jpg alt=“a cat relaxing.”>

Hi @tmenz

You are really close, just have missed the " at the end of the src attribute.
All attributes should be:

  • attribute = "blabla"

In your case :

  • src = "blabla"

In your example, alt=“a cat relaxing.” is well written.
But src= "https://www.freecatphotoapp.com/your-imge.jpg is not.
It miss at the end.

It’s all in the details.
:wink:

1 Like

Took him really long to realise it…
Lol