Dont see what i am missing

sorry guys im super green here but what am i missing? I’ve tried many options including looking to outside sources but i don’t see the missing attributes

Your code so far


<h2>CatPhotoApp</h2>
<main>
<img
src="http://cdn.freecodecamp.org/curriculum/cat-photo-app/alt A relaxing cat.jpg"/img>



<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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 Edg/95.0.1020.53

Challenge: Add Images to Your Website

Link to the challenge:

Hello!

The problem is that you added this /img> to the end of the img element. Self closing elements simply end with /> or >, hence the error.

On the other hand, elements that have children (or content inside them) require an opening tag <theTagName> and a closing one </theTagName>.

Second Problem

The src and alt attributes of the img are wrong. Each attribute needs to be a key value pair, separated a the = sign, like this:

attribute="value"

In your case, you put the alt inside the value of the src attribute. The alt should be a text describing the image for when it fails to be loaded (for example, if it was deleted).

Does it help?

your src url is wrong. instead use this:

https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg

1 Like

I’ve adapted my code to your specifications and it still doesn’t work I’m still missing two out of three task and have been this lesson for a week and a half to no avail. I’ve had some great advice on here but i cant seem to get any agreement to what’s exactly missing and how.

Did you change your closing img tag? You have the closing img tag as /img>

When all you need to close the img at the end is >

Edit: I guess you can use the /img way to, but I noticed your missing a side of the closing img tag you have /img>

It should be < /img>