Cat app step 5 not able to place </main> correct

I have tried to place the </main> element in front of <p> and behind <p>. It said it needs to put below <p>, I’ve tried that and it did not work. I also entered it in the </body> and that did not work.

  **Your code so far**

<html>
<body>
  <h1><main>CatPhotoApp</h1>
  <h2>Cat Photos</h2>
  <!-- TODO: Add link to cat photos -->
  <p></main>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/101.0.4951.64 Safari/537.36 Edg/101.0.1210.47

Challenge: Step 5

Link to the challenge:

your <main> is in wrong place. try other way around

What is the specific goal you are trying to accomplish?
What do the failing tests say?

It’s important to remember that HTML elements are nested. If you open a tag inside of another, you have to close it inside of that same tag.

This is correct

<p> I'm a paragraph
    <span> I'm inside a paragraph</span>
</p>

This will cause errors

<p> I'm a paragraph
   <span> I have a starting tag inside a paragraph
</p> Oh no!
</span> 
1 Like

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