Introduction to HTML5 Elements <main> tag

The tag defined as " It helps search engine and other developers to find main content of your page". What does this mean?
Does it mean that the text inside the main is used to describe or provide description about the page i.e. what the website is about ,when it is being read by an individual.

1 Like

<main> is where the meat of your content belongs. So yes what’s in the main tag will be what the user sees. Everything on the page you’re reading now is an example of content that would be in a <main> tag.

Is the ‘main’ here the same as ‘body’

No, the whole page content goes in the body, in the main only what is unique for the page (example, a navigation menu would be outside of main)

1 Like

Does this mean that:

  1. In case i have a website and its has a unique collection of photos and i want to have a hyperlink then; Can i have an anchor inside the ‘main’
  2. OR that ‘main’ covers the paragraph of what my website is about EXAMPLE that if i have a photography website so i would describe the photographer,the website and what makes it unique

Ahh then I myself was mistaken. Every days a school day I suppose.

Whatever is unique to the page can go in main, whatyou don’t put there are footer, header, nav-bar that repeats over multiple pages

For more Infos maybe check the documentation about main element

1 Like

Please how do I go about with adding a main element to my code. I’m a beginner in coding. Thank you.

Like all html elements you just add the opening and closing tag where appropriate <main></main>

1 Like

Thank you ieahleen, I got it.

The main element should have two paragraph elements as children? I also don’t understand, i am new to coding as well

Think about what is the most relevant content in your page. Is it a blog post? So wrap your article inside the main tag.

ThatoM, indent the first existing p element and also indent the second p element you were asked to create after the existing p element.

Don’t forget to add the opening <main> and closing tag</main> which is above and below the two p elements.