Home / Learn HTML
Learn HTML: free tutorial with live examples
Learn HTML step by step in simple English. Every lesson has many small examples. Change the code, press Run and see the result at once. 103 lessons and 799 live examples so far, and every HTML element is explained with theory, diagrams and uses.
How to learn:Go in order from the top. Read a little, then edit the example and break it on purpose. That is the fastest way to remember.
Project first pathSee the finished page, then learn only what you needMistake FinderFix broken code. The page checks itAuto-checked challenges17 tasks with a built-in checkerPrintable cheat sheetOne A4 page. Save as PDFInterview questions32 questions with answersElement explorerSearch any tag with a live exampleDaily challengeOne task a day. Keep your streakFlashcardsSpaced repetition reviewDOM tree visualizerSee the tree your HTML makesHTML checkerScore, errors and fixesTemplate downloads8 free pages, single or ZIPMock interviewTimed random questions
Your badges
Getting started
HTML Introduction10 live examplesHow to Use the Live Editor10 live examplesHTML Page Structure10 live examplesHTML Elements and Tags10 live examplesHTML Attributes11 live examples
Text
HTML Headings10 live examplesHTML Paragraphs and Line Breaks12 live examplesHTML Text Formatting16 live examplesHTML Quotations and Citations10 live examplesHTML Comments10 live examplesHTML Entities and Symbols11 live examples
Links, images, lists and tables
HTML Links17 live examplesHTML Images15 live examplesHTML Lists15 live examplesHTML Tables15 live examples
Forms
HTML Forms12 live examplesHTML Input Types21 live examplesHTML Form Elements16 live examplesHTML Form Validation and Attributes18 live examples
Media and embedding
HTML Video11 live examplesHTML Audio10 live examplesHTML Iframes and Embeds10 live examplesHTML SVG and Canvas13 live examples
Layout and style
HTML Div and Span10 live examplesHTML Classes and IDs10 live examplesHTML Semantic Elements12 live examplesHTML Styles and CSS15 live examplesHTML and JavaScript15 live examples
Every HTML element
Elements: Document and Metadata10 live examplesElements: Sections and Content Blocks34 live examplesElements: Text Level30 live examplesElements: Images, Media and Embeds16 live examplesElements: Tables and Forms24 live examplesObsolete HTML Elements10 live examples
Setup, SEO and files
How the Web and Browsers Work6 live examplesHTML History and Versions7 live examplesHTML Doctype, Charset and URL Encoding7 live examplesHTML Meta Tags and SEO12 live examplesHTML Page Title and Favicon6 live examplesHTML File Paths8 live examplesHTML Style Guide and Best Practices10 live examples
Responsive, accessible and fast
HTML Responsive Web Design13 live examplesLayout with Flexbox and Grid13 live examplesHTML Accessibility16 live examplesHTML Performance and Loading11 live examplesHTML Input Attributes22 live examplesHTML Microdata and Structured Data8 live examplesHTML Languages and Directions10 live examples
HTML5 browser features
HTML Web Storage8 live examplesHTML Geolocation and Other Browser APIs12 live examplesHTML Drag and Drop5 live examplesHTML Web Components and Template6 live examples
Practice
Mini projects
Project 1: Profile Card7 live examplesProject 2: Online Resume4 live examplesProject 3: Landing Page4 live examplesProject 4: Pricing Table3 live examplesProject 5: Photo Gallery4 live examplesProject 6: Contact Page3 live examplesProject 7: To Do List2 live examplesProject 8: Quiz2 live examples
Reference
HTML Global Attributes20 live examplesHTML Event Attributes17 live examplesHTML Cheat Sheet9 live examples
Practice and projects
HTML Mistake Finder7 live examplesBuild Your Website: Project First PathPick a project, see the finished page, read only the lessons it needs.HTML Interview Questions and AnswersRead the answer, then say it in your own words.HTML Cheat Sheet: Printable PDFPress Print, choose Save as PDF.
Tools and practice
HTML Element ExplorerType a tag name or a word like "table" or "link".Daily HTML Challenge and StreakA new challenge every day. No login. Your streak is saved in this browser.HTML Flashcards with Spaced RepetitionFlip the card, say the answer, then tell the page if you knew it.HTML DOM Tree VisualizerEvery tag is a node. Nesting becomes branches.HTML Validator and Accessibility CheckerChecks structure, SEO, accessibility and best practice. Your code never leaves your browser.Free HTML Templates to DownloadDownload, open in a browser, then edit the text and colours.HTML Mock InterviewWrite your answer first. Then see the model answer and rate yourself.
More tools
Clone Challenges: Copy This PageCompare your result with the target. The checker tests real colours, sizes and layout.Build Along: Step by Step ProjectsRead the step, write the code, and the next step opens when it is right.HTML Line by Line ExplainerGreat for reading code you copied or for finding what a tag does.HTML Fill in the BlanksType the missing word in each box and press Check.CSS Playground: Box Model, Flexbox and GridThree visual labs: box model, flexbox and grid.HTML Table GeneratorBuild a table visually and copy the code.HTML to Text and Markdown ConverterRuns in your browser. Nothing is uploaded.Meta Tag and Open Graph GeneratorTitle, description, Open Graph, Twitter card and more.HTML Special Characters and EntitiesClick any symbol to copy it. Switch between name, number and the character.Colour Picker and CSS Gradient BuilderHEX, RGB, HSL, contrast check and gradients in one place.Accessibility Simulator: Keyboard and Screen ReaderNumbers show the Tab order. The list shows what a screen reader says.Share Your HTML Code with a LinkThe code is saved in the link itself.My Notes and BookmarksNotes stay on this device. Export them any time.
Reference plus
HTML Attribute ReferenceType an attribute like href, required or aria-label. Click a group to filter.HTML and ARIA: Accessible Widgets6 live examples
More HTML5
HTML MathML: Maths Formulas5 live examplesHTML Popover and Dialog5 live examplesWeb Workers, Server-Sent Events and WebSockets1 live examplesMore Browser APIs: Clipboard, Fullscreen, Share, Notifications4 live examplesPWA Basics: Web App Manifest and Service WorkerA PWA needs HTTPS, a manifest file and a service worker.Link rel Values and Resource Hints1 live examples
Practical HTML
Set Up VS Code for HTML1 live examplesPublish Your Website on HostingerUpload your files into public_html and open your domain.HTML Email Basics1 live examplesHTML SEO Checklist1 live examplesContact Form with HTML and PHP1 live examplesHTML to Job: A Learning RoadmapHTML, CSS, JavaScript, Git, projects, portfolio, then a framework.