HTML (HyperText Markup Language) describes the content of a web page and what each part of it means. Every page you visit, from a blog post to a banking app, arrives in your browser as HTML first.
What HTML does
HTML is a markup language, not a programming language. It has no variables, loops or calculations. Instead, it wraps content in elements that say what the content is: a heading, a paragraph, a link, an image, a form.
<h1>Fresh bread daily</h1>
<p>Our bakery opens at <time datetime="07:00">7am</time>.</p>
<a href="/menu">See the menu</a>
The browser reads these elements and knows that the first line is the main heading, the second is a paragraph containing a time, and the third is a link to another page.
That meaning matters to more than the browser:
- Screen readers announce headings, links and form fields so people who cannot see the screen can navigate.
- Search engines use headings, links and structure to understand what a page is about.
- Browser features such as reader mode, translation and form autofill rely on it.
What HTML does not do
HTML describes content and structure. It does not decide how the page looks, and it does very little on its own when people interact with it. Those jobs belong to two other languages:
| Language | Job | Example |
|---|---|---|
| HTML | Content and meaning | "This is a heading. This is a button." |
| CSS | Presentation | "Headings are dark blue and 2rem tall." |
| JavaScript | Behaviour | "When the button is clicked, load more results." |
Keeping these jobs separate is one of the most useful habits you can build. A page with good HTML still works when the CSS fails to load or JavaScript is switched off. It may look plain, but people can read it and use it.
Modern HTML does include some built-in behaviour. Links navigate, forms submit, details elements open and close, and dialogs and popovers can be opened without JavaScript. You will meet these later in the course.
How a browser builds a page
When you type a web address and press Enter, a lot happens before anything appears:
- Request: the browser asks a server for the URL, for example
https://example.com/. - Response: the server sends back an HTML document, which is plain text.
- Parsing: the browser reads the HTML from top to bottom and builds the DOM (Document Object Model), a tree of objects that represents every element.
- Fetching sub-resources: as it parses, the browser finds references to stylesheets, scripts, images and fonts, and requests those too.
- Styling and layout: it combines the DOM with the CSS to work out what every element looks like and where it goes.
- Painting: it draws the result on the screen.
The browser starts showing content before everything has downloaded. That is why the order of things in your HTML affects how fast a page feels. The last lesson in this course covers how to control it.
HTML is forgiving
Browsers never refuse to show a page because of a mistake in the HTML. The HTML Living Standard defines exactly how browsers recover from errors, such as a missing closing tag. That is good for visitors, but it can hide bugs from you: the page looks fine while the DOM is not what you intended.
<p>First paragraph
<p>Second paragraph
This works because the browser closes the first paragraph automatically. Other mistakes are not recovered so neatly, which is why this course always writes complete, valid markup. You will learn to check the DOM in DevTools in the next lesson.
The HTML Living Standard
HTML is not released in numbered versions any more. The HTML Living Standard, maintained by the WHATWG (Web Hypertext Application Technology Working Group), is updated continuously as browser makers agree on new features. "HTML5" was a marketing name for a wave of features from around 2008 to 2014. Today it simply means "modern HTML".
When you need the definitive answer about an element, the specification is the source. For day-to-day learning, MDN Web Docs explains the same features with examples and browser support tables.
When a feature is new, check whether it is "Baseline" on web.dev or MDN. Baseline tells you whether a feature works in all the major current browsers, so you can decide whether to rely on it.
Where HTML comes from in practice
You will write HTML by hand in this course, but on real projects it often comes from somewhere else:
- Content management systems such as WordPress generate HTML from themes and blocks.
- Frameworks such as React, Vue and Astro produce HTML from components.
- Static site generators turn Markdown files into HTML pages.
The output is always HTML, and the browser treats it the same way. Developers who understand HTML well build faster, more accessible sites in any of these tools, because they can see when a tool produces poor markup and fix it.
Summary
- HTML describes the content of a page and what each part means.
- CSS controls presentation and JavaScript adds behaviour. Keep the three jobs separate.
- Browsers parse HTML into the DOM, fetch other resources, then style, lay out and paint the page.
- Browsers recover from HTML errors silently, so check your markup rather than trusting how it looks.
- HTML is a living standard, maintained by the WHATWG. Check Baseline before relying on new features.
In the next lesson you will create your first HTML file and inspect it in the browser.