Learn HTML by Building a Cat Photo App - Step 5

Tell us what’s happening:

the main closing tag is under

however it wont let me progress past as per the hint says ‘your main elements closing tag should be below

’ and says i 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>See more cat photos in our gallery.</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/129.0.0.0 Safari/537.36 Edg/129.0.0.0

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 5

Please click the reset button to restore the original code for this step. After that find the h1 element that is in the editor and add the main opening tag above it.
Then, find the p element that is in the editor and add the main closing tag below it.

The closing main element should be below the P element.

i have followed the example exactly as shown however it still says the main element isn’t closed beneath the p element

Okay if you have clicked reset as I suggested and then tried to follow the steps I gave you and you are still stuck then please copy all the code and paste it in your reply so we can view it.

i did try the reset suggestion, the code is exactly the same as my first post in this thread. not sure how to comment the code in here.

Welcome to the forum @alexuceanu8

Please remove the example code from the editor.

Use the following method to post code to the forum:

  1. On a separate line type three back ticks.
  2. On a separate line paste your code.
  3. On the last line type three back ticks. Here is a single back tick `

Happy coding

you actually have not followed my instructions?

Please reset again and this time, please try what I said?

I’ve edited your code for readability. 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 (').

The main element contain all the elements in the body element (The h1, h2, and p elements)

EDIT: Added for clarity

thanks for the reply, i have managed to get the main element working.

1 Like

I also think you should remove the first h1 and p elements you didn’t fill up and replace them with the ones under the main element’s closing. Your current code is giving the main content of the page to " most important content" and ’ some more important content instead of “Cat photos App” and 'see more cat photos in our gallery ’ respectively. I don’t know if this makes sense.

1 Like

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