Step 15 IMG self-closing?

I’m a bit confused. I learned that the IMG tag is self-closing, but when I look at the link in step 15 (no spoiler, since this is not the answer to the question that you need to give btw):

<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">

There is a > after the word ‘back’. Is it self -closing, but they added the > anyway?
In other words, it is self closing, but if you add it, it is not wrong?

When they say “self closing” it means that you don’t need a closing tag. > isn’t the closing tag, just part of it. for an example:

<body></body> has an opening and closing tag.
<img> is self closing with no closing tag.

Hope this helps.

Never mind, I figured it out. The > is part of the opening tag.

Ha, thank you. I just figured it out myself. Thank you for taking the time to answer!

No problem. This forum helped me out alot when I was just starting out so I like to help when I can lol.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.