Learn HTML by Building a Cat Photo App - Step 17

The second section element should not be nested in the first section element.

What am I doing wrong?

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>

<!-- section -->

        <section>
          <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>
            </section>

<!-- section -->

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

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14816.131.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 17

The request is:

It is time to add a new section. Add a second section element below the existing section element.

You are nesting one section inside another. Since it does say anything about placing any content in that new section element, it must be empty.

Do I need to take out the words “section” out?

You had this section element before.

<section>
  ...
  ...
</section>

You now have this:

<section>
    <section>
      ...
      ...
    </section>
</section>

But you are asked to have this:

<section>
   ...
   ...
</section>
<section>
</section>
1 Like

Thank you. It worked.

1 Like

@anon28508191

What you posted isn’t really solution code, but it does pass the tests. I think it’s perfectly fine but I blurred it anyway.

The tests probably shouldn’t pass with that code. But whatever.

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