Learn HTML by Building a Cat Photo App - Step 16

I am stuck here and donn’t know how to nest these h2,p,&a. I have nested h1 using main /main in step 6 or 7 but cant figure out how to do this

Your code so far

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

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

    </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/115.0.21929.110 Safari/537.36 Avast/115.0.21929.110

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

Hi, the same way you nested your h1, h2 and p tag inside a main element, nest your h2, comment, p and a elements inside a section elemrnt.
Hope it helps, goodluck!

1 Like

CatPhotoApp

Cat Photos

See more cat photos in our gallery.

A cute orange cat lying on its back. (it didnt worked)

CatPhotoApp

Cat Photos

See more cat photos in our gallery.

A cute orange cat lying on its back.

Do you mind posting your updated code

1 Like

how to post my code here

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

1 Like

You have to nest your h2 element, p element and a element in section element.
example;

<section>
  <nav></nav>
  <div></div>
</section>

I nested nav and div element in section.

2 Likes

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