HTML Introduction
HTML stands for HyperText Markup Language. It is the language every web page is written in. HTML does not make things move or calculate — its job is to describe the structure and meaning of content: "this is a heading", "this is a paragraph", "this is a link to another page", "this is a picture".
A browser such as Chrome, Firefox, Safari or Edge reads HTML and turns it into the page you see. Almost everything on the web, from a tiny personal blog to a huge online shop, starts as HTML.
HTML, CSS and JavaScript
Web pages are usually built from three languages that work together:
| Language | Role | Everyday comparison |
|---|---|---|
| HTML | Structure and meaning of the content | The walls and rooms of a house |
| CSS | Presentation: colours, fonts, layout | Paint, furniture and decoration |
| JavaScript | Behaviour and interactivity | Electricity, switches and doorbells |
In this course you focus on HTML, but you will meet a little CSS and JavaScript along the way, because real pages mix them.
What does HTML look like?
HTML is made of elements. Most elements have an opening tag, some content and a closing tag. Press ▶ Run to render this small page, then try changing the text.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My first page</title>
</head>
<body>
<h1>Hello, web!</h1>
<p>This page was written in HTML.</p>
</body>
</html>Here is what each part does:
<!DOCTYPE html>tells the browser this is a modern HTML5 document.<html>is the root element that wraps the whole page.lang="en"says the content is in English.<head>holds information about the page (its title, character set, links to stylesheets). It is not shown in the page body.<title>sets the text shown on the browser tab.<body>contains everything visible: text, images, links, tables and so on.<h1>is a top-level heading and<p>is a paragraph.
Tip: In every playground on ExcelTAD you can edit the code and press Ctrl+Enter to run it again.
Tags and elements
A tag is the text in angle brackets, such as <p> or </p>. An element is the whole thing: opening tag, content and closing tag together.
<p>I am a paragraph.</p>
^^^ ^^^^
opening tag closing tagThe closing tag has a forward slash before the name. Some elements, like <br> (line break) or <img> (image), have no content and therefore no closing tag. They are called empty or void elements.
The browser does the drawing
HTML only says what something is; the browser decides a sensible default look. Headings are big and bold, paragraphs have space around them, links are blue and underlined. Try this example and notice how you never told the browser how big the heading should be.
<h1>Recipe: Pancakes</h1>
<p>Fluffy pancakes in fifteen minutes.</p>
<h2>Ingredients</h2>
<ul>
<li>1 cup of flour</li>
<li>1 egg</li>
<li>1 cup of milk</li>
</ul>
<p><a href="#top">Back to top</a></p>This example is only a fragment — it has no <html> or <body>. Browsers are forgiving and fill in the missing pieces for you, which is handy for quick experiments. For real pages you should always write the full document structure.
A short history
| Year | Version | Notes |
|---|---|---|
| 1991 | HTML (first draft) | Tim Berners-Lee publishes the first tags at CERN |
| 1995 | HTML 2.0 | First formal standard |
| 1997 | HTML 3.2 / 4.0 | Tables, scripts, stylesheets |
| 2000 | XHTML 1.0 | Stricter XML-based syntax |
| 2014 | HTML5 | Semantic elements, audio, video, canvas, many APIs |
| Today | HTML Living Standard | Continuously updated by WHATWG |
Today there is no "HTML6" waiting in the wings: HTML is a living standard that browsers update gradually. When people say "HTML5" they usually just mean modern HTML.
Why learn HTML?
- It is the foundation of every web page and web app.
- It is easy to start — you only need a text editor and a browser.
- Frameworks such as React, Vue or Angular all produce HTML in the end.
- Good HTML makes pages accessible to screen readers and easy for search engines to understand.
Test yourself
What does HTML stand for?
- Hyper Trainer Marking Language
- HyperText Markup Language
- High Text Machine Language
- Hyperlink and Text Management Language
Which element contains the visible content of a page?
<head><title><body><meta>
What is the main job of HTML?
- Adding animations
- Describing the structure and meaning of content
- Storing data in a database
- Choosing colours and fonts