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.
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.
<!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.
Vocabulary
Elements you will use constantly
A small core of tags accounts for most of what appears on any given page.
Headings
Define a hierarchy of titles and sections, used by both readers and search engines to understand page structure.
Paragraph
Groups a block of running text. The most common element on the web for holding written content.
Anchor
Creates a hyperlink to another page, file, email address or location within the same document.
Image
Embeds a picture in the page. A required alt attribute describes the image for assistive technology.
Containers
Generic block and inline wrappers used to group content for styling and scripting purposes.
Lists
Represent unordered or ordered collections of items, each wrapped in a list item element.
Form
Collects user input through fields, buttons and controls, then submits it to a server for processing.
Table
Displays data in rows and columns, built from table row and table cell elements.
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.
Universal foundation
Every framework, from React to plain static sites, ultimately renders down to HTML in the browser.
Accessibility by default
Correct, semantic HTML is read accurately by screen readers and other assistive technology with no extra work.
Search visibility
Search engines parse HTML structure directly, so clear markup improves how a page is indexed and ranked.
Low barrier to entry
No compiler or build step is required. A text editor and a browser are enough to see immediate results.
Long-term stability
HTML written decades ago still renders today, thanks to a strong commitment to backward compatibility.
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.
<!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>