Skip to main content Skip to main navigation

HTML

Zachary Winnie , Senior Interface Designer

Example HTML document:

<!doctype html>
<html class="no-js" lang="en">
    <head>
        <meta charset="utf-8" />
        <meta http-equiv="x-ua-compatible" content="ie=edge" />
        <title></title>
        <meta name="description" content="" />
        <meta name="keywords" content="" />
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
        <link rel="stylesheet" href="css/vendor/vendor.css" />
        <link rel="stylesheet" href="css/custom/custom.css" />
    </head>
    <body id="top">
        <a href="#main" class="sr-only">Skip to content</a>
        <a href="#nav" class="sr-only">Skip to navigation</a>
        <div class="wrapper" id="wrapper">
            <header class="header" id="header">
                <nav class="nav" id="nav"></nav>
            </header>
            <main class="main" id="main"></main>
            <footer class="footer" id="footer"></footer>
        </div>
        <script src="js/vendor/vendor.js"></script>
        <script src="js/custom/custom.js"></script>
    </body>
</html>

HTML Elements

For browsers that Mercury supports, use HTML5 elements, and use them semantically, trying to avoid generic <div> and <span> elements, if possible.

  • <header>
  • <nav>
  • <main>
  • <aside>
  • <section>
  • <article>
  • <footer>
  • <video>
  • <audio>
  • <picture>

HTML Minification

Resources