KS3 Computing · A web page is text written in HTML (what's on the page), styled with CSS (how it looks), sometimes with JavaScript (what it does). Your browser fetches it from a web server using a URL and HTTP.
Networks and Digital CommunicationComputational ThinkingCambridge Lower Secondary Computing 0860
You will learn to
Use a written spec as a checklist before, during and after building.
Create a one-page wiki that meets the spec: heading, three sections, image with alt text, list, link and stylesheet.
Identify and fix tags that are missing, misspelt, in the wrong order or not closed.
Explain why a few tags, like img, never have a closing tag.
Success criteria
I can tick off every line of the spec on my finished page.
I can find and fix at least two errors in my HTML.
I can show that my stylesheet is linked, because the page changes when I edit style.css.
Key words
Say each word, then read what it means. Every one is in the glossary too.
URL
The full web address of something online.
Protocol
A set of agreed rules for communication.
HTML
Markup language for the content of web pages.
CSS
Language that styles how web pages look.
The explanation
Read it here, or open the study page below to go one step at a time with things to try.
The spec is your checklist
A spec (short for specification) is a list of what the finished work must have.
Read the spec before you start. Check it again at the end.
Spec line
The HTML that does it
A main heading
<h1>
Three sections
Three <h2> headings, each with some content under it
An image with alt text
<img src="…" alt="…">
A list
<ul> with an <li> for each item
A link
<a href="…">
A stylesheet
<link rel="stylesheet" href="style.css"> in the head
★Remember
Build one line of the spec at a time. Save, refresh the browser, and check it before the next line.
The whole page
Here is a finished wiki page. Every spec line is in it.
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<title>Tetris: a fan wiki</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Tetris</h1>
<img src="tetris.png" alt="Coloured blocks falling into a stack">
<h2>What it is</h2>
<p>A puzzle game made by Alexey Pajitnov in 1984.</p>
<h2>How to play</h2>
<ul>
<li>Turn and move the falling blocks.</li>
<li>Fill a whole row to clear it.</li>
<li>Stop the stack reaching the top.</li>
</ul>
<h2>Find out more</h2>
<p><a href="https://en.wikipedia.org/wiki/Tetris">Tetris on Wikipedia</a></p>
</body>
</html>
<!DOCTYPE html> tells the browser this is a modern HTML page.
lang="en-GB" says the page is in British English. Screen readers use it to choose a voice.
The head holds information about the page. You do not see it on the page itself.
<meta charset="utf-8"> lets the page show characters like é and ñ correctly.
The <title> shows on the browser tab. The <link> joins the page to its stylesheet.
The body holds everything you see on the page.
Indenting means adding spaces at the start of a line. It shows which tags sit inside which. The browser ignores it, but people need it.
!Watch out
Keep index.html, style.css and the image in the same folder. Otherwise the browser cannot find them.
The stylesheet
This is style.css. It sits in the same folder as index.html.