by DannyUpdated 9 sections

Pick the element that says what the content is. Styling comes later.

Download the PDF

Page skeleton


_12
<!doctype html>
_12
<html lang="en">
_12
<head>
_12
<meta charset="utf-8" />
_12
<meta name="viewport"
_12
content="width=device-width, initial-scale=1" />
_12
<title>Page title</title>
_12
<link rel="stylesheet" href="/styles.css" />
_12
<script type="module" src="/app.js"></script>
_12
</head>
_12
<body>...</body>
_12
</html>

Page structure


_10
<header>Logo and main nav</header>
_10
<nav aria-label="Main">...</nav>
_10
<main>
_10
<article>
_10
<h1>One h1 per page</h1>
_10
<section><h2>Part</h2></section>
_10
</article>
_10
<aside>Related links</aside>
_10
</main>
_10
<footer>Small print</footer>

Text


_10
<p>Paragraph with <strong>importance</strong>
_10
and <em>emphasis</em>.</p>
_10
<a href="/about">Internal link</a>
_10
<a href="https://x.dev" target="_blank"
_10
rel="noopener noreferrer">External</a>
_10
<code>inline code</code>
_10
<time datetime="2026-11-29">29 Nov</time>

Lists and tables


_10
<ul><li>Bullet</li></ul>
_10
<ol start="3"><li>Numbered</li></ol>
_10
<dl><dt>Term</dt><dd>Definition</dd></dl>
_10
_10
<table>
_10
<caption>Prices</caption>
_10
<thead><tr><th scope="col">Plan</th></tr></thead>
_10
<tbody><tr><td>Free</td></tr></tbody>
_10
</table>

Forms


_14
<form action="/signup" method="post">
_14
<label for="email">Email</label>
_14
<input id="email" name="email" type="email"
_14
required autocomplete="email" />
_14
_14
<label>
_14
<input type="checkbox" name="news" /> News
_14
</label>
_14
_14
<select name="plan">
_14
<option value="free">Free</option>
_14
</select>
_14
<button type="submit">Sign up</button>
_14
</form>

Input types

TypeGives you
emailFormat check, email keyboard
telPhone keypad
numberSpinner, min, max, step
dateDate picker
searchClear button
passwordHidden characters

Images and media


_10
<img src="cat.jpg" alt="Ginger cat asleep"
_10
width="800" height="600" loading="lazy" />
_10
_10
<picture>
_10
<source srcset="cat.avif" type="image/avif" />
_10
<img src="cat.jpg" alt="Ginger cat" />
_10
</picture>
_10
_10
<video src="demo.mp4" controls muted></video>

Interactive elements


_10
<details>
_10
<summary>Show more</summary>
_10
Hidden until opened.
_10
</details>
_10
_10
<dialog id="confirm">
_10
<form method="dialog"><button>Close</button></form>
_10
</dialog>
_10
<button popovertarget="menu">Menu</button>
_10
<div id="menu" popover>...</div>

Accessibility

  • Every image needs alt. Use alt="" for decoration.
  • Every input needs a label.
  • Use a button for actions and an a for navigation.
  • Add aria-label only when there is no visible text.
  • Mark the current page link with aria-current="page".