Build a Cat Photo App - Step 5

Tell us what’s happening:

hi,
i have tried everything still saying" Your main element’s closing tag should be below the p element. You have them in the wrong order."

Your code so far

<html>
  <body>

<!-- User Editable Region -->

  <main>
  <h1>Most important content of the document</h1>
  <p>Some more important content...</p>
  </main>
    <h1>CatPhotoApp</h1>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p>Everyone loves cute cats online!</p>
    

<!-- User Editable Region -->

  </body>
</html>

Your browser information:

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

Challenge Information:

Build a Cat Photo App - Step 5

Welcome to the forum :wave:

The instructions did not ask you to copy the example code into the editor. You should basically never do that, it’s just an example of syntax.

Reset the step, and try it again.

<main><h1>Most important content of the document</h1>
  <p>Some more important content...</p></main>

i have tried, still not working

This text is part of the example and should not be included in your code.

I’ve edited your post to improve the readability of the code. 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 (').

<main><h1>Cat photos</h1>
  <p>Cat photos...</p></main>

thank you, appreciate it.
this is what i've tried

you need to add main aroung the existing element, do not add other elements this step

<main>
  <h1>Cat photos</h1>
  <p>Cat photos...</p>
</main>

and still not working

reset the step, restore the code as it was, then you must add ONLY main.

main has to go around the EXISTING h1, h2, comment and p

<main><h>Cat photos</h></main>
 <main <p>Cat photos...</p> </main>
  <main><h1>CatPhotoApp</h1></main>
  <main><h2>Cat Photos</h2></main>

Just add main once, and nest all three existing elements within.

It should look a bit like this:

<element>
    <nested></nested>
    <nested></nested>
    <nested></nested>
</element>

You should RESET the step to get the original code back to the starting state.

those are still not the elements you need to have. Have you reset the step?

 <main>
    <h1>Cat photos</h1>
    <p>Cat photos</p>
</main>

This is good but:

Press the Reset button to reset the code to the original state.

The code should start like this:

    <h1>CatPhotoApp</h1>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p>Everyone loves cute cats online!</p>

If it doesn’t look like that, press "Reset" below the “check your code” button.

I sorted, thank you.
sorry for being a pain :smile:

1 Like

Not a problem, glad you got it!

It should get easier as you get to know how the steps and lessons work.