HTML Document

An HTML Document is a text file written for web browsers to read.

Absolute Basic HTML5 Document

The absolute basic HTML structure needed to define a document:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Doc Title</title>
    </head>
    <body>
         <!-- Document content goes here. -->
    </body>
</html>

Basic HTML5 Document

Same as the most basic HTML structure but with some added common elements:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Doc Title</title>
        <link name="global-styles" rel="stylesheet" href="/css/global.css">
        <script name="globalsite-javascript" src="/js/global.js"></script>
    </head>
    <body>
        <header>
             <div><a href="/"><span>Site Title</span></a></div>
             <nav>
                 <!-- Global navigation menu goes here. -->
             </nav>
        </header>
        <main>
            <h1>Page Title</h1>
            <!-- Main page content goes here. -->
        </main>
        <aside>
            <!-- Sidebar content goes here. -->
        </aside>
        <footer></footer>
    </body>
</html>

More Resources