HTML5 Tutorial & Reference
Semantic structure, accessible forms, media performance, and native dialogs.
HTML5 Learning Path
Follow the HTML5 Curriculum
Read the guides in order from fundamentals to production patterns, or jump to your current skill level.
Showing closest & fuzzy matches for your search.
HTML5 Document Structure: DOCTYPE, Head, and Body
How do I write a valid HTML5 document from scratch?
HTML Charset, Viewport, and SEO Meta Tags
Which meta tags belong in the head of every HTML page?
HTML Headings and a Logical Document Outline
How should h1 through h6 be used so the outline stays logical?
HTML Paragraphs, Line Breaks, and Readable Text
When should I use a paragraph instead of a br line break?
HTML5 Semantic Landmarks: header, nav, main, and footer
How do I structure header, nav, main, article, section, aside, and footer?
ARIA Basics: Roles, Labels, and When Not to Use Them
When should I add ARIA, and when is native HTML enough?
HTML Links: href, Absolute and Relative URLs, and rel
How do I write accessible links with safe href and rel values?
HTML Lists: ul, ol, dl, and Nested Navigation
How do I mark up unordered, ordered, and description lists?
HTML Images and alt Text for Accessibility and SEO
How do I write alt text that helps screen readers and image search?
Responsive Images with picture, srcset, and lazy Loading
How do I serve sharp images without wasting mobile bandwidth?
HTML Script Loading with defer, async, and type=module
How do I load JavaScript without blocking HTML parsing?
Accessible HTML Forms, Input Types, and Native Validation
How do I build a form with labels, input types, and native validation?
HTML Button Types: submit, button, and reset
Why does a button submit the form when I only wanted a click?
HTML Form Methods: GET versus POST
When should a form use GET instead of POST?
Accessible HTML Tables with thead, tbody, and scope
How do I associate table headers with their cells?
HTML data-* Attributes and the dataset API
How do I store small configuration values on an element?
HTML Disclosure Widgets with details and summary
How do I build a native accordion without JavaScript?
Accessible Modals with the HTML dialog Element
How do I open an accessible modal with the dialog element?
HTML figure and figcaption for Captioned Media
How do I attach a caption to an image or a code sample?
HTML time Element for Dates
How do I mark a date so machines and people can both read it?
Fieldset and Legend for Form Groups
How do I label a group of related radio buttons?
Sandboxed iframes
How do I embed a page without giving it your site privileges?
Open Graph Meta Tags
Which meta tags control a link preview title and image?
The HTML template Element
How do I store inert markup to clone with JavaScript?
progress and meter Elements
How do I show a completion amount in HTML?
Autocomplete Tokens on Inputs
How do I help browsers fill a checkout form correctly?
The HTML mark Element for Search Highlights
How do I mark words that matched a search?
HTML datalist for Suggested Input Values
How do I suggest track names without a closed dropdown?
The HTML Popover API
How do I open a small note without a dialog script?
The HTML search Landmark
How do I mark the site search form as a landmark?
The HTML download Attribute
How do I offer a file save instead of navigation?
inputmode for the Right Mobile Keyboard
How do I open a numeric keyboard without type=number?
The spellcheck Attribute
How do I turn spell checking off for code and on for prose?
The HTML output Element
How do I show a calculated result inside a form?
Hidden Fields and What Not to Trust
What is a hidden input for, and what must the server ignore?
The wbr Element for Optional Breaks
How do I let a long path wrap without adding spaces?
Link an external CSS file
How do I attach a stylesheet?
div vs span
When do I use div or span?
Radio button group
How do I let users pick only one option?
Checkboxes as PHP arrays
How do I submit multiple checkboxes to PHP?
Select dropdown
How do I make a dropdown menu?
Textarea multi-line input
How do I collect long comments?
Date, hidden, and file inputs
What special input types should I know?
Audio and video embeds
How do I embed media without Flash?
Internal CSS with style tag
How do I put CSS inside the HTML file?
Semantic navigation bar
How do I mark up a site nav?
Explicit label for= binding
How do I connect a label to an input?
Figure with caption
How do I caption an image semantically?
Embed with iframe
How do I embed another page or map?
No guides matched that search.
Try a shorter keyword, a synonym (like js or db), or remove a filter.