Learn HTML by Building a Cat Photo App - Step 5

The Directions says

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 put before h1 and I get an error saying that has to be under the body element.

Can someone help me and explain what I’m doing wrong?

In the past the direction says after but now it says before.

Your code so far

<html>
  <body>
    <main>   
      <h1>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 (X11; CrOS armv7l 12371.89.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36

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

Link to the challenge:

Your solution works from my end. Please try one of the following steps to move forward.

Click on the “Restart Step” button and force a refresh of your page with CTRL + F5 then try to paste the code in again.

or - Try the step in incognito or private mode.

or - Disable any/all extensions that interface with the freeCodeCamp website (such as Dark Mode, Ad Blockers, or Spellcheckers), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

or - Ensure your browser is up-to-date or try a different browser.

I hope one of these will work for you.

1 Like

It also works from my end, don’t know if that helps, but just so you know.

Thank you very much! I updated my browser and it worked!

1 Like

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