Learn HTML by Building a Cat Photo App - Step 16

Okay, this seems easy enough. Section off the H2,comment,p, and a. I put <section infront of H2 and put at the end of the a. Why is it saying I don’t have them in the sections?

Your code so far


<!-- User Editable Region -->


   <section <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
 <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p> 
 <a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a></section>


<!-- User Editable Region -->


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Learn HTML by Building a Cat Photo App - Step 16

Link to the challenge:

Something is missing behind the < section the other > before the h2 element.

I thought it was suppose to be left open. So it’s < section > and not < section?

Right, section is an element and elements will always be in this structure


There will be times you add an attribute to elements so sometimes it could look like this, but it will always have a closing >

<element attribute>
1 Like

So, “Img” and “a” both can be left open because they are atributes and not elements?

If you recall in your last post for your img you were missing the >. So img never stays open, everything in between the img is its attribute. So this for example

<img src="link to photo">

Here the img has an attribute src, but it ends with the closing >. Its also good to note that the img is self closing, which means it does not need </img> a closing tag like other elements do

The a is also not left opened For exampe,

<a href="link"> </a>

Here the a has the href attribute, but after the attribute it has the closing > for the first tag. Also, a is not self closing so it needs the closing tag </a>

Thank you for explaing that to me!

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