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.

Performance

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

Advanced HTML

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