10 minutes, beginner
HTML: your first web page
By the end you’ll have written headings, paragraphs and a list, and you’ll know what a tag is.
1. Say it
HTML is made of tags. Each one tells the browser what kind of thing you’re writing. Here are the ones you’ll use today.
| Tag | What it does | Example |
|---|---|---|
<h1> | The biggest heading | <h1>Hello</h1> |
<h2> | A smaller heading | <h2>My hobbies</h2> |
<p> | A paragraph of text | <p>Nice to meet you.</p> |
<strong> | Important text (shown bold) | <strong>Look!</strong> |
<em> | Emphasised text (shown italic) | <em>really</em> |
<ul> and <li> | A bulleted list, and each item in it | <ul><li>Tea</li></ul> |
Tip: You can’t break anything here. If the page looks odd, press “Start again” in the editor below and it goes back to the beginning.
2. Know it
Most tags come in pairs. There’s an opening tag like <p> and a closing tag like </p>, which has a slash. Whatever sits between them is the content. The whole thing is called an element.
Computers do exactly what you write, not what you meant. Forget a closing tag and the page can look wrong. That’s normal, and spotting the missing bit is a big part of coding.
One honest note: HTML describes what’s on a page, so it’s called a markup language rather than a programming language. Languages like JavaScript make pages do things. HTML is where nearly everyone starts.
3. Use it
Edit the code on the left. The page on the right updates as you type. Then try the three challenges.
- Challenge 1: change the heading to your own words.To do
- Challenge 2: add a second paragraph.To do
- Challenge 3: add a bulleted list with at least three items.To do
Stuck on the list? A list is a <ul> with one <li> for each item: <ul><li>Tea</li><li>Toast</li><li>Jam</li></ul>
The preview only shows HTML. Nothing you type here is saved or sent anywhere.
4. Check it
Done!
You’ve written real HTML and seen it turn into a web page.