Learn HTML
A structured guide to HTML, from the document itself to text, media, forms, semantics, accessibility, and the markup around them.
Welcome
Start with what HTML is, how a page is written, and the doctype that tells the browser which rules to use.
-
HTML Welcome Guide: What HTML Is and How to Start Learning
Learn what HTML is, why it matters, how it fits the web, its key features, common myths, and the best next steps for beginners.
-
What Is HTML? A Beginner-Friendly HTML5 Introduction
Learn what HTML is, how it structures web pages, where it fits in web development, and why semantic HTML5 matters for accessibility and SEO.
-
HTML Setup and Editors: Install Tools and Start Writing HTML
Learn how to set up a simple HTML environment, choose an editor, verify your tools, fix common issues, and start building web pages.
-
HTML Basic Syntax: Elements, Tags, Attributes, and Nesting
Learn HTML basic syntax, including tags, attributes, nesting, comments, and semantic structure, with clear examples and common mistakes.
-
Your First HTML Page: A Beginner’s Guide to Semantic HTML
Learn how to build your first HTML page with semantic tags, metadata, headings, links, images, and accessible page structure.
-
HTML Doctype and HTML Versions: What the Declaration Means
Learn what the HTML doctype is, how it affects browser rendering, and how HTML versions evolved from HTML4 to HTML5.
Document Structure
See how head and body divide a document, and how title and metadata describe the page.
-
HTML Head and Body: Structure, Purpose, and Best Practices
Learn what the HTML head and body do, what belongs in each one, how they work together, and common mistakes to avoid.
-
HTML Metadata: Using meta, charset, and viewport Tags
Learn how HTML metadata works, including meta, charset, and viewport tags for encoding, mobile scaling, SEO basics, and accessibility.
-
HTML Title and Favicon: Page Titles, Tabs, and Site Icons
Learn how to set the HTML page title and favicon, why they matter for SEO and accessibility, and how to add them correctly in the head.
-
HTML Comments: Syntax, Uses, and Common Mistakes
Learn how HTML comments work, when to use them, how to write them correctly, and common mistakes that break markup or expose hidden content.
Text Content
Mark up headings, paragraphs, lists, links, and the other text a page is made of.
-
HTML Headings (h1–h6): Structure Pages with Semantic Text
Learn how HTML heading tags h1 to h6 structure content, improve accessibility, and create clear page hierarchies without common heading.
-
HTML Paragraphs: How to Use the Paragraph Element Correctly
Learn how HTML paragraphs work, when to use the p element, common mistakes to avoid, and accessibility best practices for text content.
-
HTML Lists (ul, ol, dl): Unordered, Ordered, and Description Lists
Learn how to use HTML lists with ul, ol, and dl, including nesting, accessibility, semantics, and common mistakes to avoid.
-
HTML Links: Anchor Tags, href, and target Explained
Learn how HTML links work with the anchor tag, href, and target. See accessibility tips, common mistakes, and practical examples.
-
HTML Text Formatting: b, i, em, strong, and More
Learn HTML text formatting tags like b, i, em, and strong, when to use each, accessibility tips, common mistakes, and examples.
-
HTML Quotations: blockquote, q, and cite Explained
Learn how to use HTML blockquote, q, and cite correctly for quoted text, citations, and accessible semantic markup.
-
HTML Code, Keyboard Input, and Sample Output Tags
Learn when to use HTML code, pre, kbd, and samp tags to mark code, keyboard input, and sample output with correct semantic and accessible.
-
HTML Character Entities ( , ©): Meaning and Usage
Learn HTML character entities like   and ©, when to use them, how they render, and common encoding mistakes to avoid.
Media
Add images, audio, video, and embedded content, and give each one a caption or alternative text.
-
HTML Images: Using img, srcset, and alt Correctly
Learn how HTML images work with img, srcset, and alt. See responsive image examples, accessibility guidance, and common mistakes to avoid.
-
HTML Responsive Images with picture and source
Learn how HTML responsive images work with picture and source, including art direction, format switching, fallbacks, and common mistakes.
-
HTML Audio: How to Embed and Control Sound on the Web
Learn how to use the HTML audio element to embed sound, add controls, support multiple formats, and make audio playback accessible.
-
HTML Video: The <video> Element, Attributes, and Best Practices
Learn HTML video with the <video> element, essential attributes, multiple sources, captions, autoplay rules, and accessibility best.
-
HTML iframe and Embeds: Loading External Content Safely
Learn how HTML iframe and embed elements work, when to use them, and how to make embedded content accessible and secure.
-
HTML figure and figcaption: Semantic Images, Captions, and Media
Learn how HTML figure and figcaption group images, code, and media with captions, improve semantics, and support accessible page structure.
-
HTML Canvas: Drawing Graphics with the <canvas> Element
Learn how HTML canvas works, how to draw shapes and text, when to use it, accessibility tips, common mistakes, and practical examples.
-
Inline SVG in HTML: Using Scalable Vector Graphics Inline
Learn how to use inline SVG in HTML, add accessible labels, style shapes with CSS, and avoid common embedding mistakes.
Tables
Build tables with headers, captions, and the structure screen readers need.
-
HTML Table Basics: Building Semantic Tables with <table>, <tr>, <th>, and <td>
Learn HTML table basics, including table structure, headers, captions, and accessible semantic markup for displaying tabular data correctly.
-
HTML Table Headers & Scope: Using th, thead, tbody, and scope
Learn how HTML table headers work with th, thead, tbody, and scope to make tables accessible, readable, and correctly associated.
-
HTML Table Captions: Using the <caption> Element Correctly
Learn how HTML table captions work, where to place them, and how to write accessible, descriptive table labels with the caption element.
-
HTML Accessible Tables: Build Tables Screen Readers Can Read
Learn how to make HTML tables accessible with captions, headers, scope, and associations that help screen readers understand data.
Forms
Collect input with labels, the right control for each value, and the attributes that send the form.
-
HTML Forms & Input Basics: Building User Input Forms
Learn the HTML form element, common input types, labels, validation, and accessible form structure for collecting user data correctly.
-
HTML Input Types: text, email, range, and More
Learn HTML input types like text, email, range, number, date, and file, plus validation, accessibility, and common form mistakes.
-
HTML Labels & Accessibility: How to Connect Forms Correctly
Learn how HTML labels improve form accessibility, how to connect them correctly, and common mistakes that break screen reader and click.
-
HTML Select, Option, and Datalist: Building Choice Controls
Learn how HTML select, option, and datalist work together to build accessible choice controls, dropdowns, and suggested text inputs.
-
HTML Textarea: The <textarea> Element for Multi-Line Text Input
Learn how HTML textarea works, including attributes, accessibility, sizing, validation, and common mistakes when building multi-line form.
-
HTML Buttons and Submit Buttons in Forms
Learn how HTML buttons work in forms, when to use button and input submit, default submit behavior, and common accessibility pitfalls.
-
HTML Form Validation with required and pattern
Learn how HTML form validation works with required and pattern, including accessibility tips, common mistakes, and practical examples.
-
HTML Form Attributes: action, method, and enctype
Learn how HTML form action, method, and enctype control where data goes, how it is sent, and which encoding to use.
Semantic HTML
Choose elements that describe the page, from landmarks to structured data and search metadata.
-
Why Semantics Matter in HTML: Meaningful Structure and Accessibility
Learn why semantic HTML matters, how it improves accessibility, SEO, maintainability, and how to choose the right elements for meaningful.
-
HTML Structural Elements: header, nav, main, section, article, aside, footer
Learn when to use HTML structural elements like header, nav, main, section, article, aside, and footer for accessible page structure.
-
HTML Inline vs Block Elements: Differences and When to Use Each
Learn the difference between HTML inline and block elements, how they affect layout, and when to use each for semantic, accessible markup.
-
HTML Microdata & Schema.org: Add Structured Data to Pages
Learn how HTML microdata and Schema.org structured data work, how to mark up pages, common mistakes, and best practices for SEO.
-
HTML SEO Metadata & Open Graph: Meta Tags for Search and Sharing
Learn how to write HTML SEO metadata and Open Graph tags for better search snippets, social previews, accessibility, and page sharing.
Attributes
Use the attributes every element can carry, including data attributes, ARIA, and focus order.
-
HTML Global Attributes: id, class, style, and title
Learn HTML global attributes like id, class, style, and title, when to use each one, common mistakes, and accessibility best practices.
-
HTML Data-* Attributes: Custom Metadata for Elements
Learn how HTML data-* attributes store custom metadata, how to name and read them, and when to use them safely and accessibly.
-
ARIA & Accessibility Attributes in HTML: Roles, Labels, and Best Practices
Learn how HTML ARIA and accessibility attributes improve labels, roles, and keyboard support, plus common mistakes and best practices.
-
HTML tabindex and Focus Management: Keyboard Navigation Guide
Learn how HTML tabindex works, how focus order is affected, and how to manage keyboard navigation and accessibility safely.
-
HTML Custom Attributes: data-* Attributes and HTML Extensibility
Learn how HTML custom attributes work, when to use data-* attributes, naming rules, and how to avoid common markup mistakes.
Links & Navigation
Link to other pages and places on the same page, and mark up the navigation around them.
-
HTML Anchors and href: Creating Links and Jump Targets
Learn how HTML anchors and href work, how to link to pages, sections, email, phone, and files, plus accessibility and common mistakes.
Performance
Load images and scripts when they are needed, and know what preload and minification change.
-
HTML Loading Attributes: lazy, async, and defer Explained
Learn how HTML loading attributes lazy, async, and defer affect images and scripts, when to use each one, and how to avoid common loading.
Advanced HTML
Use dialogs, templates, custom elements, and the other elements that go beyond basic markup.
-
HTML Sandboxed iframes & Security: Safe Embedding Guide
Learn how HTML sandboxed iframes improve security, what each sandbox token does, common mistakes, and safer ways to embed untrusted content.