Free tutorial · 34 lessons
HTML Tutorial
Learn HTML from scratch: page structure, headings, text, links, images, lists, tables, semantic elements, forms, input validation, media, meta tags for SEO and accessibility, then the HTML5 features: canvas, SVG, responsive images, dialog and popover, details, new form elements and the validation API, templates, data attributes, iframe sandboxing, web storage, drag and drop, ARIA, structured data and loading performance — with live previews you can edit in your browser.
HTML Basics
- HTML Introduction — What HTML is, how browsers read it and what an element looks like.
- HTML Get Started — Write HTML in an editor, save it as .html and open it in a browser.
- HTML Document Structure — DOCTYPE, html, head and body — the skeleton of every page.
- HTML Headings and Paragraphs — Structure text with h1–h6, paragraphs, line breaks and horizontal rules.
- HTML Text Formatting — Strong, emphasis, code, quotes and other inline text elements.
- HTML Links — Create links with <a>, absolute and relative URLs, new tabs and page anchors.
- HTML Images — Add images with alt text, sizes, lazy loading and responsive sources.
- HTML Lists — Unordered, ordered and description lists, and nesting.
- HTML Tables — Build accessible data tables with headers, captions and spanning cells.
- HTML History & Versions — How Tim Berners-Lee invented HTML for the World Wide Web, every version from the first 18 tags to HTML5 and today's Living Standard on one timeline, what HTML5 changed, and how new elements reach browsers now.
Page Structure
- HTML Block and Inline Elements — The difference between block and inline elements, and when to use div and span.
- HTML Classes and IDs — Name elements with class and id for styling, scripting and linking.
- HTML Semantic Elements — header, nav, main, article, section, aside and footer.
- HTML Head and Meta Tags — Title, meta description, viewport, Open Graph tags and favicons — the SEO essentials.
- HTML Forms — Collect user input with form, label, input, select, textarea and button.
- HTML Input Types and Validation — email, number, date, range and more — plus built-in validation attributes.
- HTML Audio, Video and Iframes — Embed audio, video and other pages.
- HTML Entities and Accessibility — Reserved characters, symbols, and the accessibility basics every page needs.
HTML5 Features
- HTML5 Overview — What HTML5 added to the web: semantic elements, native media, graphics, richer forms, interactive elements and browser APIs.
- HTML Canvas — Draw shapes, text and simple charts with the canvas element and its 2D drawing API.
- HTML Inline SVG — Draw scalable vector graphics with svg, use viewBox to scale them, and make them accessible.
- HTML Responsive Images — Serve the right image size and format with srcset, sizes and picture, and avoid layout shifts.
- HTML Dialog and Popover — Build accessible modal dialogs with <dialog> and lightweight popups with the popover attribute, without a library.
- HTML Details and Summary — Create accordions and disclosure widgets with <details> and <summary>, keyboard-accessible with no JavaScript.
- HTML5 Form Elements — Suggest values with datalist, show results with output, and display progress and measurements with progress and meter.
- HTML Form Validation API — Use built-in validation attributes, custom messages with setCustomValidity, and the :user-invalid style, then still validate on the server.
- HTML Templates and Data Attributes — Store custom data on elements with data-* attributes and reuse markup with the <template> element.
- HTML Iframes and the sandbox Attribute — Embed other pages safely with iframe, sandbox, allow, title and lazy loading.
- HTML Web Storage — Save small amounts of data in the browser with localStorage and sessionStorage, and know their limits.
- HTML Drag and Drop — Make elements draggable and handle drops with the HTML Drag and Drop API, plus a keyboard alternative.
- HTML ARIA Essentials — Use native elements first, then ARIA roles, states and live regions where HTML alone can't express what's happening.
- HTML Structured Data (JSON-LD) — Describe products, articles and FAQs to search engines with JSON-LD and schema.org.
- HTML Loading and Performance — Load scripts with defer, async and type=module, preload critical resources, and prioritise what matters for the first view.
Next Steps
- HTML Next Steps — Style your pages with CSS and make them interactive with JavaScript.