HTML Checking for Large Sites

Rocket Validator automatically checks your pages on the W3C Validator.

A document must not include more than one visible “main” element.

There can only be one visible <main> element in a document. If more are needed (for example for switching between them with JavaScript), only one can be visible, the others should be hidden toggling the hidden attribute.

Example of 2 main elements, where only one is visible:

  <h1>Active main element</h1>
  <!-- content -->

<main hidden>
  <h1>Hidden main element</h1>
  <!-- content -->

Learn more:

MDN: Aria Main role HTML Spec: the main element

Related W3C validator issues

Still checking your large sites one page at a time?

Save time using our automated web checker. Let our crawler check your web pages on the W3C Validator.