Learn HTML by Building a Cat Photo App - Step 25

I need some help over here. I don’t know what to do! This is what the platform tells me:
Test

Sorry, your code does not pass. Hang in there.

Hint

There should be an h3 element right above the second section element’s closing tag. Make sure it has an opening and closing tag.
Thank You!

  **Your code so far**
<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <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>
      <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>
      <h2>Cat Lists</h2>
      <h3>Things cats love:</h3>
      <ul>
        <li>cat nip</li>
        <li>laser pointers</li>
        <li>lasagna</li>
      </ul>
      <figure>
        <h3>Top 3 things cats hate:</h3>
        <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate.">
        <figcaption>Cats <em>love</em> lasagna.</figcaption>  
      </figure>
    </section>
  </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/103.0.5060.134 Safari/537.36 Edg/103.0.1264.77

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

Link to the challenge:

Consider whether the h3 was added AFTER the figure element or INSIDE of it!!

2 Likes

Well, the first h3 is outside of it and the second one inside of it, as the challenge tells me. And idk where I’m wrong :sob:

Let me take some of the code away for you.

<figure>
  <h3>Top 3 things cats hate:</h3>


</figure>

This may make it easier to look at now :+1:. (You got this!)

1 Like

(post deleted by author)

Do you remember the idea of nesting? And how we can put an element inside of another.
Let me break down some examples for you.

<div></div>
<a href="">Link text</a>
<p>P text</p>

In this example, there’s an empty div, an anchor element and a p element. Both the anchor and p elements are after the div.

<div>
  <a href="">Link text</a>
</div>
<p>P text</p>

This time, I’ve nested ONLY the anchor element, the p is still sitting outside the div. You can tell that because of where the div opens, and closes. The div element is everything from the opening to the closing tag.

Hope this helps!!

1 Like

You have to add second h3 element after figure closing tag<h3> Top 3 things cats hate:</h3>.

1 Like

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