Learn HTML by Building a Cat Photo App - Step 5

So I am being asked to:

Step 5

HTML5 has some elements that identify different content areas. These elements make your HTML easier to read and help with Search Engine Optimization (SEO) and accessibility.

Identify the main section of this page by adding a <main> opening tag before the h1 element, and a </main> closing tag after the p element.
I answered :


why is this wrong?
Your code so far

<html>
  <body>

<!-- User Editable Region -->

<main><h1></main><p>
    <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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36

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

Link to the challenge:

Hi there and welcome to our community!

You should be:

adding a <main> opening tag before the h1 element, and a </main> closing tag after the p element.

You have added the main opening tag before the h1 element, though you have also added stray h1 and p tags which should not be there. That line of code should contain only a main opening tag, nothing else.

The main closing tag should be after the p element, several lines further down from where you have put it. Again, it should sit alone on its own line, below the p element.

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