Learn HTML by Building a Cat Photo App - Step 16

Tell us what’s happening:
It asked to nest the code. Am I misunderstanding or doing something wrong?

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
<section>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a>.</p>
      </section>
      <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>

    </main>
  </body>
</html>

Your browser information:

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

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

Link to the challenge:

The existing h2 , comment, p element, and anchor (a ) element should be between the opening and closing tags of the section element.

Could you provide an example? I figured they would be between by putting it as
section - Opening
h2
comment
p
a
section - Closing

Is that not the correct way of doing it?

Nevermind I figured it out. I assumed when it asked to nest between P and A it meant just the first line and not the second a href line.
After putting the section closing tag after the second URL in the line of code it worked.

1 Like