HTML

The markup language that gives every web page its structure.

HTML (HyperText Markup Language) describes the structure and content of a web page: headings, paragraphs, links, images, forms and more. It is a markup language rather than a programming language, and it is the starting point for anything you build for the browser.

  • Beginner
  • 8 lessons
  • Runs in your browser
Not started yet
Start lesson 1

Lessons

  1. Your First Web PageYou'll create a .html file, learn the basic structure every page shares, and open it in a browser. No server is needed.
  2. Text & HeadingsYou'll learn the elements for headings, paragraphs, quotes and other kinds of text. Choosing the right one helps browsers, search engines and screen readers understand your page.
  3. Links & ImagesYou'll learn how to link pages together with <a> and add images with <img>, including the alt text that makes images accessible.
  4. Lists & TablesYou'll learn how to mark up ordered and unordered lists, and how to build tables for tabular data. Tables are for data only, not for page layout.
  5. FormsForms are how users send you information, from search boxes to sign-up pages. You'll learn the main input types, labels and built-in validation.
  6. Semantic HTMLSemantic HTML means choosing elements that describe their content, such as <nav>, <main> and <article>, instead of using <div> for everything. It makes pages easier to navigate with assistive technology and easier to maintain.
  7. Mini Project: Personal PageYou'll build a complete personal homepage using semantic HTML. It covers structure only; styling comes in the CSS track.
  8. HTML CheatsheetDocument structure, semantic tags, and forms on one page.

Install it on your own computer

You only need a text editor and a web browser, which you probably already have. Save a file with a .html extension and open it in your browser to see it rendered. You do not need this to follow the lessons: the examples run in your browser.

Bash
# You need: a text editor and a browser
# Text editor options:
#   VS Code (recommended): code.visualstudio.com
#   Notepad (built-in — not recommended)

# Create hello.html in VS Code
# Open it in Chrome/Firefox/Edge
# Done — no compilation needed

# Optional: Live Server VS Code extension
# (auto-refreshes the browser when you save)

What people build with HTML

Learn the basics first, then pick up these tools when a project needs them.

Practical uses

  • Structure every website and web application
  • Create accessible documents and forms
  • Build email templates
  • Describe content for browsers, readers, and search engines

Projects to try

  1. Semantic personal profile
  2. Accessible restaurant menu
  3. Multi-page documentation site
  4. Validated checkout form

Common tools and packages

HTML ValidatorEmmetPrettieraxe DevToolsLighthousehtmxAlpine.jsNunjucks

Well-known software

Every public websiteWikipediaMDN Web DocsGOV.UKGitHub PagesHTML email