$html-docs
InstallDevelopersPricingSign inOpen drive
All HTML guides
Foundations6 min read·July 29, 2026

A Reusable HTML Page Structure for New Projects

Begin with a small, valid document shell that supports accessibility, responsive design, metadata, and progressive enhancement.

The short version

A dependable starter should be boring, explicit, and easy to extend.

01

Use a complete document shell

A starter should declare the doctype, language, character encoding, and viewport before adding application-specific markup. Keep the head understandable. Every tag should have a reason to exist.

html
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Project title</title>
  <meta name="description" content="A precise summary of this page.">
  <link rel="stylesheet" href="/styles.css">
</head>
<body>
  <a class="skip-link" href="#main">Skip to content</a>
  <header>…</header>
  <main id="main">…</main>
  <footer>…</footer>
  <script type="module" src="/app.js"></script>
</body>
</html>
02

Add capability only when the page needs it

Do not start every project with a large framework, icon font, analytics bundle, and animation library. Begin with the content and the one or two interactions the page actually requires. A smaller dependency surface is easier to audit and easier to hand off.

03

Keep the starter valid over time

Save the starter as a template only after it survives a real project. The best template captures patterns you have verified, not every pattern you might someday need.

  • Run an HTML validator after structural changes.
  • Test the skip link and keyboard focus.
  • Check the page at narrow and wide widths.
  • Confirm metadata uses the production host.
  • Remove commented experiments before publishing.

Official references

  • WHATWG: Writing HTML documents
  • W3C WAI: Page structure

In this guide

  1. 01Use a complete document shell
  2. 02Add capability only when the page needs it
  3. 03Keep the starter valid over time
Publish a page

Keep going

Related HTML guides

Browse all 24 guides
Foundations7 min read

How to Write Semantic HTML That Stays Useful

Choose elements for their meaning, build a clear document outline, and make your page easier to navigate, edit, and reuse.

Read guide
Foundations7 min read

How to Organize CSS Around Your HTML

Keep selectors shallow, components readable, and design tokens explicit so a page remains easy to revise after launch.

Read guide
Foundations6 min read

How to Add Dark Mode Without Breaking Your HTML

Respect system preferences, preserve contrast, and keep native controls and embedded content legible in both themes.

Read guide
© 2026 HTML DocsInstallSupportPrivacyTermsAPI