On this page
  1. Document & Landmarks
  2. Contents
  3. Minimal Standards-Mode Document
  4. Landmark Elements

Document & Landmarks

Prev: elements | Up: elements | Next: Text & Lists
Rel: Semantic Document Structure, Critical Rendering Path
Ref: MDN Web Docs — HTML Elements
Tags: #public #web #html #elements


Contents


Minimal Standards-Mode Document

<!DOCTYPE html> triggers standards mode (avoiding quirks mode layout bugs). Set lang on <html>, declare UTF-8 first inside <head>, and include the responsive viewport meta tag.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Document Title</title>
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <header><nav aria-label="Primary"></nav></header>
    <main>
      <article>
        <h1>Article Heading</h1>
        <p>Main content.</p>
      </article>
      <aside>Related links</aside>
    </main>
    <footer><p>&copy; 2026</p></footer>
  </body>
</html>

Landmark Elements

Element Implicit ARIA Role Purpose
<header> banner (when top-level) Site/section introductory content
<nav> navigation Major navigation blocks
<main> main Primary unique page content (one visible per page)
<article> article Self-contained, syndicatable composition
<section> region (when named) Thematic grouping with a heading
<aside> complementary Tangentially related content (sidebars, callouts)
<footer> contentinfo (when top-level) Metadata, copyright, secondary links

Linked from

Related notes