Learn HTML by Building a Cat Photo App - Step 5

Tell us what’s happening:
Describe your issue in detail here.
My closing main element is incorrect and I do not how to fix it

  **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></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/104.0.0.0 Safari/537.36

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

Link to the challenge:

“…adding a <main> opening tag after the h1 element,…”

An element includes its opening tag, closing tag, and any content in between those two tags. So when you add a main tag after the h1 element, you need to add it after the entire element.

You have added it inside the h1 element.

1 Like

h1, h2 and p tags were supposed to be nested in main tag

Also learn to begin a new tag on a new line

No, the h1 tag is not supposed to be nested in main.

Instructions: “…adding a <main> opening tag after the h1 element”

Therefore you are supposed to close the h1 tag and then open the main tag

The main element comes after the h1 element. Why would you be closing main before closing h1 if main comes after? Maybe I’m not understanding what you are saying?

I edited my reply in a way it was supposed to be