Learn HTML

A structured guide to HTML, from the document itself to text, media, forms, semantics, accessibility, and the markup around them.

Start learning HTML

Welcome

Start with what HTML is, how a page is written, and the doctype that tells the browser which rules to use.

Document Structure

See how head and body divide a document, and how title and metadata describe the page.

Text Content

Mark up headings, paragraphs, lists, links, and the other text a page is made of.

Media

Add images, audio, video, and embedded content, and give each one a caption or alternative text.

Tables

Build tables with headers, captions, and the structure screen readers need.

Forms

Collect input with labels, the right control for each value, and the attributes that send the form.

Semantic HTML

Choose elements that describe the page, from landmarks to structured data and search metadata.

Attributes

Use the attributes every element can carry, including data attributes, ARIA, and focus order.

Links & Navigation

Link to other pages and places on the same page, and mark up the navigation around them.

HTML APIs & Integration

See how HTML connects to the DOM, media controls, drag and drop, web components, and storage.

Accessibility

Write markup that works with alt text, landmarks, labels, ARIA, and the keyboard.

Performance

Load images and scripts when they are needed, and know what preload and minification change.

Internationalization

Set the page language and text direction so the browser handles each language correctly.

Advanced HTML

Use dialogs, templates, custom elements, and the other elements that go beyond basic markup.

Core Rules of Thumb

Prefer meaningful elements, label controls, add alt text, and check the markup before you ship it.

Appendix

Use the glossary, style notes, and the HTML specifications when you need a reference rather than a lesson.