Having trouble where to put the closing tag </main> below the <p> and </p>

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

  **Your code so far**
<html>
<body>
  <h1><main>CatPhotoApp</h1>
  <h2>Cat Photos</h2>
  <!-- TODO: Add link to cat photos -->
  <p>Click here to view more cat photos.</p>
</body>
</html>
  **Your browser information:**

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

Challenge: Step 5

Link to the challenge:

Hi brodie! you have to nest your h2 and p element within the main element

Hi!

The main opens after the body opening tag and closes before the body closing tag.
Like this

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

Also, HTML elements work like a Matryoshka doll. You can put a html element inside another element like this,

<main>
<h1>Hello world!</h1>
</main>

But you can’t do this and have an element incomplete inside another element. It will always be invalid html.

<h1><main>Hello world</h1>
</main>

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