I do not understand how to nest HTML elements inside the main element tags

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
  <main>
  
  <h2>Cat Photos</h2>
  <!-- TODO: Add link to cat photos -->
  <p>Click here to view more cat photos.</p>

  </main>
  </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/97.0.4692.99 Safari/537.36

Challenge: Step 6

Link to the challenge:

Hey there! Welcome to the forums :wave: :slightly_smiling_face:

What exactly are you not understanding?

You can nest elements in <main> the same way you’ve nested elements in <body>. You place the <main> opening tag, then the elements you are nesting, then the </main> closing tag. For example if I were to nest to <p>s in a <div>, it would look like:

<div>
  <p> Text </p>
  <p> Text </p>
</div>
1 Like


I have done same thing

Pretty sure the lesson has an indentation requirement. Might reread :wink:

indent the h2 element, the comment, and p element exactly two spaces

I just figured it out, thank you.

1 Like

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