Guide
HTML
HTML Fundamentals Guide 2026: Semantic Web Standards π
HTML5 is the semantic foundation of modern web development, providing structure, accessibility, and SEO value through elements like <article>, <section>, <main>, and ARIA attributes. Every production website starts with properly structured HTML that search engines love, screen readers understand, and developers maintain.
π― Modern HTML5 Document Structure
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#3b82f6">
<title>Modern HTML5 Guide | Web Standards</title>
<link rel="canonical" href="https://yoursite.com/html-guide">
</head>
<body>
<a href="#main" class="sr-only sr-only-focusable">Skip to main content</a>
<header>
<nav aria-label="Main navigation">
<!-- Navigation -->
</nav>
</header>
<main id="main">
<article>
<!-- Main content -->
</article>
</main>
<aside aria-label="Related content">
<!-- Sidebar -->
</aside>
<footer>
<!-- Footer -->
</footer>
</body>
</html>
ποΈ Semantic HTML Elements (Production Ready)
Document Landmarks
<!-- Core structure with ARIA labels -->
<main id="main" aria-labelledby="page-title">
<header role="banner">
<h1 id="page-title">Article Title</h1>
</header>
<article role="article">
<header>
<h2>Section Heading</h2>
<time datetime="2026-04-18">April 18, 2026</time>
</header>
<section aria-labelledby="features-heading">
<h3 id="features-heading">Key Features</h3>
<!-- Content -->
</section>
</article>
<aside role="complementary" aria-label="Recommended reading">
<!-- Sidebar content -->
</aside>
</main>
Interactive Components
<!-- Accessible buttons and links -->
<button type="button" aria-expanded="false" aria-controls="menu">
Menu
</button>
<details>
<summary aria-expanded="false">FAQ Question?</summary>
<p>Answer goes here...</p>
</details>
<dialog aria-labelledby="modal-title" aria-describedby="modal-desc">
<h2 id="modal-title">Modal Title</h2>
<p id="modal-desc">Modal description</p>
<form method="dialog">
<button>Close</button>
</form>
</dialog>
π Modern Forms (HTML5 + Accessibility)
<form action="/contact" method="post" novalidate aria-describedby="form-help">
<fieldset>
<legend>Personal Information</legend>
<div class="field">
<label for="full-name">Full Name <abbr title="Required">*</abbr></label>
<input
type="text"
id="full-name"
name="fullName"
required
minlength="2"
maxlength="50"
aria-describedby="name-help"
>
<small id="name-help">Enter your full name</small>
</div>
<div class="field">
<label for="email">Email Address <abbr title="Required">*</abbr></label>
<input
type="email"
id="email"
name="email"
required
autocomplete="email"
aria-describedby="email-help"
>
<small id="email-help">We'll never share your email</small>
</div>
</fieldset>
<fieldset>
<legend>Preferences</legend>
<input type="checkbox" id="newsletter" name="newsletter">
<label for="newsletter">Subscribe to newsletter</label>
</fieldset>
<div class="field">
<label for="message">Message</label>
<textarea
id="message"
name="message"
rows="5"
maxlength="500"
placeholder="Tell us more..."
></textarea>
</div>
<div class="actions">
<button type="reset">Reset</button>
<button type="submit">Send Message</button>
</div>
<small id="form-help">Required fields are marked with *</small>
</form>
πΌοΈ Images + Media (Modern Standards)
<!-- Responsive images with art direction -->
<picture>
<source
media="(min-width: 1200px)"
srcset="/images/hero-desktop.webp 1200w, /images/hero-desktop@2x.webp 2400w"
sizes="1200px"
>
<source
media="(min-width: 768px)"
srcset="/images/hero-tablet.webp 768w, /images/hero-tablet@2x.webp 1536w"
sizes="768px"
>
<img
src="/images/hero-mobile.webp"
alt="Hero image description"
width="400"
height="300"
loading="eager"
decoding="async"
>
</picture>
<!-- Figure with caption -->
<figure>
<img
src="/images/chart.png"
alt="Sales growth chart"
width="800"
height="400"
loading="lazy"
>
<figcaption>Figure 1: Annual sales growth (2026)</figcaption>
</figure>
π Lists + Tables (Data Markup)
<!-- Definition lists -->
<dl>
<dt>HTML</dt>
<dd>HyperText Markup Language - structure</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets - presentation</dd>
<dt>JavaScript</dt>
<dd>Dynamic behavior and interactivity</dd>
</dl>
<!-- Accessible data tables -->
<table aria-describedby="sales-help">
<caption>Sales by Region (2026)</caption>
<thead>
<tr>
<th scope="col">Region</th>
<th scope="col">Q1</th>
<th scope="col">Q2</th>
<th scope="col">Total</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">North America</th>
<td>$1.2M</td>
<td>$1.5M</td>
<td>$2.7M</td>
</tr>
</tbody>
</table>
<small id="sales-help">All values in USD millions</small>
π― Accessibility-First Best Practices
1. Focus Management
<!-- Skip links for keyboard users -->
<a href="#main-content" class="sr-only sr-only-focusable">
Skip to main content
</a>
<!-- Proper focus indicators -->
button:focus-visible {
outline: 2px solid #3b82f6;
outline-offset: 2px;
}
2. Screen Reader Only Content
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
3. ARIA Live Regions
<div
role="status"
aria-live="polite"
aria-atomic="true"
class="sr-only"
id="status-message"
></div>
<script>
// JavaScript announces changes
statusMessage.textContent = "Form submitted successfully";
</script>
π§ Modern HTML5 Features
| Feature | Use Case | Example |
|---|---|---|
loading="lazy" | Images below fold | <img loading="lazy"> |
decoding="async" | Image performance | <img decoding="async"> |
popover | Custom overlays | <div popover>Content</div> |
inert | Disable interactions | <section inert>...</section> |
translate="no" | Prevent translation | <span translate="no">β¬</span> |
β Production Checklist
β [] DOCTYPE + lang attribute β [] Semantic landmarks (