Learn HTML by Building a Cat Photo App - Step 5

Tell us what’s happening:
Describe your issue in detail here.

The exercise has asked me to place a main opening tag after the h1 element and a main closing tag after the p element. I did this, however it keeps telling me that it is incorrect. Can someone double check my work? Is this a glitch in the lesson itself? I’ve tried placing it below the whole code itself, still marks me wrong.

  **Your code so far**
  <h2>Cat Photos</h2>
  <!-- TODO: Add link to cat photos -->
  <p></main>Click here to view more cat photos.</p>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15

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

Link to the challenge:

You should never use the main element this way.
The main element is always used to say that the part inside it is the main one, so the main opening tag should be placed under the h1 element, which means the line after it, and above the h2 element.
While the main closing tag main should be put in the line between the body tag and the p tag.
If it didn’t help, let me know so i can help you.

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

The image with the solution has been removed from your post.

Hi! Welcome to the forum!

This is an element. Elements can come in various kinds as you have seen. But this is a paragraph element.


It is made of an opening tag <p>, and a closing tag </p>.

So if the main element needs to start after the h1 element, it needs to have its opening tag after the h1 elements closing tag.

If the main element needs to end after the p element, it needs to have its closing tag after the p elements closing tag.

Hope that helps!

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