KS3 · Computer Science
Introduction to HTML
Every web page you've ever visited began as a plain text file — just words wrapped in little labels like <h1> and <p>. Today you learn to write the labels.
Computer Science · Structure
A web page is a tree of boxes
Each line joins an element to the element it sits inside. Tap any box to find out what it's for.
Tap any part of the diagram to see what it does.
Predict, then check
Read the file like a browser: head first, then body.
A browser opens this file: <!DOCTYPE html> <html> <head> <title>Pond Life</title> </head> <body> <h1>Frogs</h1> <ol> <li>Spawn</li> <li>Tadpole</li> <li>Frog</li> </ol> </body> </html> — what do you see?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
HTML doesn't draw a page. It labels what each part is — and the browser does the drawing.
What you need to know
- A web page is a text file written in HTML, a markup language that labels what each part of the page is.
- A web browser reads the HTML and displays (renders) the page.
- HTML is written with tags in angle brackets; an element is the opening tag, the content and the closing tag together.
- Every page has the same skeleton: <!DOCTYPE html>, then an <html> element holding a <head> and a <body>.
The big picture
A web page is a text file written in HTML (HyperText Markup Language). HTML is a markup language: it describes a page's structure and content by wrapping each part in tags, and a web browser reads it and displays the page. Elements sit inside other elements — a head and a body inside html — and nested tags close in the reverse order to the one they were opened in.
Key points
Worked example
Problem
Write the HTML for a page about a school chess club. The browser tab should say Chess Club. On the page there should be a main heading Chess Club, a paragraph saying We meet on Fridays., and a picture from the file board.jpg, described as A chessboard for anyone who can't see it.
⚠ Watch out
Closing tags in the same order you opened them, like <p>Visit <a href="games.html">my games</p></a>. The <a> was opened last, so it has to close first: <p>Visit <a href="games.html">my games</a></p>.
Memory hook
Think of nesting dolls. You can't close the big doll until the small one inside it is shut. Last opened, first closed.
Check yourself
Cover the page and write an HTML skeleton from memory: doctype, then <html> holding a <head> (with a <title>) and a <body>. Is every tag closed, last-opened first?
Flashcards
(15)What is HTML?
What does a web browser do with an HTML file?
What is the difference between a tag and an element?
How is a closing tag written differently from an opening tag?
What is the first line of an HTML document?
Which part of an HTML page describes the page rather than appearing on it?
What goes in the <body>?
Which heading is the most important: <h1> or <h6>?
<ul> or <ol> — which gives a numbered list?
What does the href attribute on a link give?
What do src and alt give on an image?
Name a common element with no closing tag.
In what order do nested tags close?
What makes the World Wide Web a 'web'?
What usually controls a page's colours, fonts and layout?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore KS3 Computer Science topics
- Abstraction in computational thinking
- Adding binary numbers
- Binary to denary conversion
- Boolean logic: AND, OR, NOT
- Bubble sort
- Building truth tables
- Client-server vs peer-to-peer
- Collecting and recording data
- Comparing sorting algorithms
- Compressing data
- Creating a 3D animation
- Decomposition: splitting problems up
How this lesson was checked. This KS3 Computer Sciencelesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 1 October 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.