Learn HTML: Step by Step
Learn HTML fundamentals. 27 lessons, in order, each with a code editor to practice in.
Start with lesson 1: What Is HTML? Your First Web Page →Getting Started
- What Is HTML? Your First Web PageLearn what HTML is, how browsers turn it into a page, and write and run your first web page in a few minutes.
- HTML Document Structure: doctype, head and bodyUnderstand every part of an HTML page: the doctype, the html, head and body elements, meta tags, comments and nesting.
- HTML Elements and Tags Explained in DetailLearn the difference between an HTML element, a tag and an attribute, how nesting works, and why void elements are not really self-closing.
- HTML Attributes In Depth: Global Attributes You Should KnowGo beyond href and src: learn HTML's global attributes — id, class, style, title, lang, data-*, hidden, tabindex — and why inline style is a last resort.
- HTML Text Basics: Paragraphs, Headings, Lines and SpansStructure text the right way with paragraphs, six heading levels, line breaks, horizontal rules and spans, and avoid the most common beginner mistakes.
- HTML Block and Inline Elements Explained with ExamplesLearn how block and inline elements take space, why width, height and margin behave differently, how to switch them with CSS display, and how to spot them.
- HTML Grouping: div, span, class and id ExplainedLearn how to group HTML elements with div and span, name groups with class and id, nest containers, and know when a semantic element is the better choice.
- HTML Text Formatting Tags: strong, em, mark, sub, sup and MoreLearn every HTML text formatting tag with real meaning, not just looks: strong vs b, em vs i, mark, small, del, ins, sub, sup, s, and why big is deprecated.
Links, Media, Lists and Tables
- HTML Links: The Anchor Tag, href, target and rel ExplainedLearn the HTML anchor tag in depth: absolute and relative URLs, target values, jumping to a section, mailto and tel links, download links, and rel security.
- HTML Images In Depth: img, alt, figure and Lazy LoadingLearn the HTML img element properly: src, meaningful alt text, width and height to avoid layout shift, lazy loading, figure/figcaption, and image formats.
- HTML Audio: The audio Tag, source, controls and AutoplayLearn the HTML audio element in depth: controls, multiple formats with source, autoplay problems, loop, muted, preload values, and accessible audio.
- HTML Video: The video Tag, poster, source and CaptionsLearn the HTML video element in depth: controls, source for multiple formats, poster, width and height, autoplay rules, and adding captions with track.
- HTML iframe In Depth: Embedding, sandbox and SecurityLearn the HTML iframe element properly: src, width/height, the required title attribute, sandbox for security, lazy loading, and why some sites block embedding.
- HTML Lists In Depth: ul, ol, dl and Nesting ExplainedLearn unordered, ordered and definition lists in HTML, custom numbering with type and start, nested lists, styling with CSS, and when to use each list.
- HTML Tables In Depth: thead, tbody, rowspan, colspanLearn HTML tables: table, tr, th, td, thead/tbody/tfoot, merging cells with rowspan and colspan, captions, accessible headers, and when to avoid tables.
Building Real Pages
- HTML Forms Basics: form, input, label and button ExplainedLearn HTML forms from the ground up: the form element, action and method, input and name, connecting label to input, button types, and a full example.
- HTML Input Types: text, email, number, date, checkbox and MoreA practical guide to HTML input types — text, email, password, number, date, checkbox, radio, range and file — with real attributes and use cases.
- HTML select, textarea, fieldset and legend ExplainedLearn the HTML select dropdown with optgroup, the textarea for multi-line text, and how fieldset and legend group related form fields properly.
- HTML Form Validation: required, pattern, min, max ExplainedLearn HTML's built-in form validation: required, pattern with regex, minlength/maxlength, min/max/step, custom messages, novalidate, and its real limits.
- HTML Entities: <, &, and Special CharactersLearn why HTML needs character entities for symbols like <, >, & and quotes, the most useful named and numeric entities, and when nbsp actually helps.
Professional HTML
- HTML Semantic Elements: header, nav, main, article, sectionLearn semantic HTML: when to use header, nav, main, article, section, aside, footer, figure and time instead of div, and why it helps accessibility and SEO.
- HTML Head and Meta Tags: SEO, Open Graph, Favicons, CanonicalLearn the meta tags that matter beyond charset and viewport: description, Open Graph and Twitter Card previews, favicons, canonical URLs, and robots.
- HTML Accessibility Basics: Landmarks, Keyboard and FocusLearn web accessibility fundamentals: alt text, heading order, form labels, landmark elements, keyboard navigation, visible focus styles, and skip links.
- ARIA Basics: When (and When Not) to Use ItLearn the first rule of ARIA, plus aria-label, aria-labelledby, aria-describedby, aria-hidden, aria-expanded and aria-live, with real custom-widget examples.
- HTML details, dialog, progress and meter ElementsLearn HTML's native interactive elements: details/summary for accordions and FAQs, dialog for modals, progress for task completion, and meter for gauges.
- HTML SEO Basics: Titles, Headings and Structured DataLearn how HTML itself affects search rankings: titles, heading hierarchy, meta description, semantic markup, alt text, canonical URLs, and JSON-LD.
- HTML Best Practices and Validation: Write Clean, Correct HTMLLearn to validate HTML with the W3C validator, fix the most common errors, follow consistent code style, and use a pre-launch checklist for real pages.