Chapter 11 of 17 · HTML for Beginners — Complete Free Tutorial
Semantic HTML5 Layout
Before HTML5, every page was built from anonymous <div> soup: <div class="header">, <div class="sidebar">. HTML5 introduced semantic elements — tags whose names literally describe the content they hold. This chapter is about writing markup that humans, browsers, search engines, and screen readers all understand.
The core layout elements
<body>
<header>
<nav aria-label="Main"> ... menu links ... </nav>
</header>
<main>
<article>
<h1>Understanding fermentation</h1>
<section>
<h2>What is proofing?</h2>
<p> ... </p>
</section>
<section>
<h2>Signs your dough is ready</h2>
<p> ... </p>
</section>
</article>
<aside>
<h3>Related reading</h3>
<ul> ... </ul>
</aside>
</main>
<footer>
<p>© 2026 The Scriptly</p>
</footer>
</body>
What each element means
| Element | Meaning |
|---|---|
<header> | Introductory content — logo, site nav, author byline. One per page or per article. |
<nav> | Major navigation block (menus, table of contents, pagination). |
<main> | The page's unique central content — exactly one per page, not inside header/footer/aside. |
<article> | A self-contained composition that stands alone: a blog post, product card, comment, or news story. |
<section> | A thematic grouping of content, usually with its own heading. |
<aside> | Content tangentially related — sidebars, related links, glossary boxes. |
<footer> | Closing info — copyright, author, contact links. Works for pages and articles alike. |
section vs. article vs. div
<article>: could be syndicated elsewhere and still make sense. A tutorial chapter? Yes.<section>: a themed chunk identified by a heading. Use when content belongs to the surrounding document.<div>: no semantic meaning — a styling/positioning hook only. When in doubt, ask: "would a heading make sense here?" If no →div.
Document outline & screen reader navigation
Assistive technology lets users jump between landmarks: skip straight to main, then to nav, then by headings. Two accessibility essentials:
<!-- 1. Skip link: first focusable element on the page -->
<a class="skip-link" href="#main">Skip to main content</a>
...
<main id="main"> ... </main>
<!-- 2. Distinguish multiple navs -->
<nav aria-label="Primary">...</nav>
<nav aria-label="Footer">...</nav>
Why search engines love semantics
- Crawlers infer structure: one
<main>, headings as an outline,<article>as indexable units. - Google can extract sitelinks from your
<nav>and answer boxes from well-outlined content. - Schema markup (see HTML & SEO) maps directly onto these elements.
Real-life use case
The tutorial page you are reading follows this pattern exactly: <header> with site nav, a left <nav> sidebar listing chapters, <main> wrapping this <article>, an <aside> with related tutorials, and a <footer>. Every landmark is keyboard-reachable and announced correctly.
Common mistakes
- Duplicate
<main>— invalid; one per document. - Heading inside
<header>used as the page's only<h1>while<main>holds the real title — keep the primaryh1inmain. - Everything as
<article>— paragraphs, lists, and widgets are not articles. <section>without a heading — if there is no heading, it is probably adiv.- Multiple
<footer>s with identical content — footers inside articles should hold article metadata (author, date), not site-wide links.
Best practices
- Build the skeleton semantically first, style later. CSS targets elements and classes equally.
- Start every page: skip link →
header/nav→main→footer. - Give every
sectionan<h2>; keep heading levels sequential. - Older browsers (IE) ignore unknown elements — harmless in 2026; all modern browsers support them natively.
What's next?
Add rich media with Audio & Video, or write special characters correctly with HTML Entities.
Frequently Asked Questions
HTML (HyperText Markup Language) is the standard markup language that defines the structure and meaning of every web page. Learning HTML is the fastest way into web development: it is the foundation that CSS, JavaScript, and every framework build upon, and it directly affects SEO and accessibility.
Most beginners can build their first complete page in a day and become comfortable with the core tags within 1–2 weeks of daily practice. This 17-chapter series is designed to be completed in about 2–3 weeks at a relaxed pace, faster if you type out every example.
Only a plain text editor (VS Code is free and popular) and a web browser. No installation, no setup, no account — create a file called index.html, double-click it, and it opens in your browser.
HTML5 is the current generation of the HTML standard (published as the living standard by WHATWG). When people say "HTML5" they usually mean modern HTML: semantic elements like header, nav and article, native audio/video, canvas, and improved form input types — all covered in this tutorial.
No. HTML is a markup language — it describes content and structure but has no variables, loops, or conditionals. Those come with programming languages like JavaScript, which you would learn after HTML and CSS.
Right here: every chapter includes examples you can retype in your own index.html file, plus practice challenges. After this series, build small projects — a portfolio page, a recipe page, or a landing page for a local business — they exercise the same tags in real contexts.
Search engines crawl HTML first. Unique titles, a single clear h1, a logical heading hierarchy, descriptive alt text, valid markup, fast-loading responsive images, and a proper internal linking structure all come straight from HTML — see the HTML & SEO chapter for the full checklist.
Accessible HTML makes your site usable by everyone, including people who rely on screen readers or keyboards, and it is a legal requirement in many countries. The good news: proper labels, semantic elements, alt text, and keyboard-operable controls are mostly free HTML habits.
No — there are roughly 100 meaningful tags and you will naturally use about 30 of them regularly. Focus on understanding purpose and structure; editors and references (like MDN) handle the rest. This tutorial covers every tag beginners actually need.
CSS for visual design and layout, then JavaScript for interactivity, then a version control system (Git). With those three you can build complete websites; frameworks like React or Laravel Blade come after the fundamentals feel natural.