Introduction to HTML
Take The Quiz
What is HTML?
HTML (HyperText Markup Language) is the standard language of the web. It does not “program” anything — it describes the structure and meaning of a page using small labels called elements (or “tags”).
The three languages of the web
Almost every website is built from three layers that work together. HTML comes first: it is the skeleton everything else builds on.
- HTML — structures the content: titles, paragraphs, images, links.
- CSS — styles that content: colours, spacing, layout, fonts.
- JavaScript — adds behaviour: clicks, animations, data.
Your first HTML document
Every page starts from the same skeleton. Type it into a file, save it as index.html, and open it in any browser.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My first page</title>
</head>
<body>
<h1>Hello, world!</h1>
<p>This is my first web page.</p>
</body>
</html>No installation needed
You only need a plain text editor and a browser. No server, no build tools — just save the file and double-click it.
Anatomy of an element
Most elements have an opening tag, some content, and a closing tag. The browser reads the tags to know what each piece of content is.
<p>This is a paragraph.</p>
<!-- opening tag, content, closing tag -->Close your tags
Most elements must be closed (<p>…</p>). A few are “self-closing” and stand alone, like <img> or <br>.