Since 1993 · W3C & WHATWG standard

The markup that
gives the web its structure.

HTML, HyperText Markup Language, is the foundational language used to describe the structure and content of every page on the web. It tells the browser what a heading is, what a paragraph is, and where an image belongs.

<a href="/docs">Read the docs</a>
Bracket & slash
Element name
Attribute
Attribute value
Content

Definition

Content, not styling

HTML describes meaning and structure: a heading, a list, a form field, a link. It does not decide how something looks; that job belongs to CSS. It does not decide how something behaves; that job belongs to JavaScript. HTML simply says what each piece of the page is.

Every HTML document is built from elements. An element is usually made of an opening tag, some content, and a closing tag. Browsers read this structure from top to bottom and build the page accordingly, a process known as parsing the DOM.

Because it is declarative and text based, HTML is readable by both humans and machines, which is also why search engines and screen readers rely on it to understand a page.

index.html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>My page</title>
  </head>
  <body>
    <h1>Hello, HTML</h1>
    <p>This is a paragraph.</p>
  </body>
</html>

Timeline

How HTML got here

A short line through three decades of a language that has been rewritten many times without ever losing backward compatibility.

1991
Tim Berners-Lee proposes HTML
A small set of tags is described as a way to share linked documents across research institutions, laying the groundwork for the web.
1995 – 1997
HTML 2.0 and HTML 3.2
The language is formally specified for the first time, adding forms, tables and a wider vocabulary of elements.
1999
HTML 4.01
A mature, widely adopted version that separated structure from presentation and served the web for over a decade.
2004
WHATWG is formed
Browser vendors begin developing HTML as a living standard, independent from the stalled XHTML 2.0 effort.
2014
HTML5 becomes a W3C recommendation
Native support arrives for audio, video, canvas and semantic elements such as article, section and nav.
Today
A living standard
HTML continues to evolve through the WHATWG, adding capability while keeping decades-old pages working.

Vocabulary

Elements you will use constantly

A small core of tags accounts for most of what appears on any given page.

<h1>–<h6>

Headings

Define a hierarchy of titles and sections, used by both readers and search engines to understand page structure.

<p>

Paragraph

Groups a block of running text. The most common element on the web for holding written content.

<a>

Anchor

Creates a hyperlink to another page, file, email address or location within the same document.

<img>

Image

Embeds a picture in the page. A required alt attribute describes the image for assistive technology.

<div> <span>

Containers

Generic block and inline wrappers used to group content for styling and scripting purposes.

<ul> <ol> <li>

Lists

Represent unordered or ordered collections of items, each wrapped in a list item element.

<form>

Form

Collects user input through fields, buttons and controls, then submits it to a server for processing.

<table>

Table

Displays data in rows and columns, built from table row and table cell elements.

<section> <article>

Semantics

Describe the purpose of a region of the page, improving accessibility, SEO and code readability.

Motivation

Why HTML is worth learning well

It is the one language shared by every website, every framework and every browser.

01

Universal foundation

Every framework, from React to plain static sites, ultimately renders down to HTML in the browser.

02

Accessibility by default

Correct, semantic HTML is read accurately by screen readers and other assistive technology with no extra work.

03

Search visibility

Search engines parse HTML structure directly, so clear markup improves how a page is indexed and ranked.

04

Low barrier to entry

No compiler or build step is required. A text editor and a browser are enough to see immediate results.

05

Long-term stability

HTML written decades ago still renders today, thanks to a strong commitment to backward compatibility.

06

Works everywhere

Every modern device with a browser, from phones to televisions, can render the same HTML document.

Get started

Write your first document

Save this as an .html file and open it in any browser. No installation required.

starter.html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, initial-scale=1">
  <title>Starter Page</title>
</head>
<body>
  <header>
    <h1>Welcome</h1>
  </header>
  <main>
    <p>This is where your content lives.</p>
  </main>
</body>
</html>