Skip to main content
HTML Validation

The “main” element must not appear as a descendant of the “section” element.

About This HTML Issue

The main element represents the dominant contents of the document, so it should not be contained within another section.

A document must not have more than one main element that does not have the hidden attribute specified.

A hierarchically correct main element is one whose ancestor elements are limited to html, body, div, form without an accessible name, and autonomous custom elements. Each main element must be a hierarchically correct main element.

Last reviewed: November 29, 2022

Was this guide helpful?

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Ready to validate your sites?
Start your free trial today.