Year 8 · Y8.6 Web Development · Lesson 1
Stretch tasks HTML: structure
Quiz Challenge
A quiz game against four computer players, then short and long written answers.
- Quiz Blitz12 questions against the clock
- Quick Fire4 short answers
- Big Think2 long answers
About 20 minutes
This or That
Pixel the cat asks 8 questions. Each has two answers: pick the right one.
- Two answers to every question
- A fish treat for every right answer
- Streaks win Pixel shades, then a party hat
About 4 minutes
Memory Match
Flip the cards two at a time to match each tag card to its meaning card.
- 12 cards: each tag has a meaning
- One peek at every card
- Combo points for pairs found in a row
6 pairs, about 4 minutes
The games need JavaScript. Every question is below, with the answers at the end.
Read the lesson: HTML: structure
HTML: structure: the questions
Quiz Challenge, round 1: Quiz Blitz
Which line is nested correctly?
<p><strong>Hi</p></strong><strong><p>Hi</strong></p><p>Hi<strong></p></strong><p><strong>Hi</strong></p>
Which tag makes a link to another page?
<url><a><link><href>
The alt attribute on an image is optional decoration that most sites can skip.
- True
- False
What does HTML describe?
- How fast the page loads
- The structure of a page: what each thing is
- How the page looks: colours and fonts
- How the server stores the page
Which TWO are self-closing tags?
Tick 2.
<h1><li><img><br><p>
Put these tags in the order they open in a web page.
Number these 1 to 5.
<html><head><title><body><!DOCTYPE html>
Which tag makes a numbered list? Type it with its angle brackets.
Where does the text in a page's <title> appear?
- Inside every paragraph
- On the browser tab
- As the biggest heading on the page
- At the bottom of the page
A page about pets shows a photo of a ginger cat asleep on a keyboard. Which alt text is best?
- A ginger cat asleep on a computer keyboard
- image1.jpg
- Picture
- Click here
What does this HTML show?
<ul> <li>Milk</li> <li>Eggs</li> </ul>- A numbered list with two items
- A table with two rows
- Two links
- A bulleted list with two items
h1 is for the most important heading, normally used once per page.
- True
- False
Which attribute tells an <img> which picture to show?
hrefaltlinksrc
Quiz Challenge, round 2: Quick Fire
Explain why HTML and CSS are kept separate. [2 marks]
Give two reasons why alt text matters. [2 marks]
This HTML is broken. Explain what is wrong, and how to fix it. [2 marks]
<p>Hello <strong>world</p></strong>What is the difference between a div and a span? [2 marks]
Quiz Challenge, round 3: Big Think
A student's page has no headings, its images have no alt text, and every link says click here. Explain why this is a problem, and how to fix it. [4 marks]
Plan a simple web page about a hobby. Explain which HTML elements you would use, and why. [6 marks]
This or That: tick the right answer
Which part of a page holds everything you can see on screen?
<head><body>
Which is the closing tag for a paragraph?
<\p></p>
You want to group a heading and two paragraphs into one block. Which tag?
<span><div>
Which tag is one cell of a table?
<tr><td>
What does this show in the browser?
<p>Hello <strong>world</strong></p>- The tags, printed as text
- Hello world, with world in bold
What does the H in HTML stand for?
- HyperText
- High-level
Which line attaches an external stylesheet?
<style src="style.css"><link rel="stylesheet" href="style.css">
Which heading tag is the least important?
<h6><h1>
Memory Match: match each tag to its meaning
| Tag | Meaning |
|---|---|
A <p> | 1 A link to another page |
B <a> | 2 A paragraph of text |
C <img> | 3 The most important heading |
D <ol> | 4 One cell in a table |
E <td> | 5 A numbered list |
F <h1> | 6 A picture, which needs src and alt |
Answers
Round 1: Quiz Blitz
<p><strong>Hi</strong></p>Tags close in the reverse order they opened: the last one opened is the first one closed.<a><a href="..."> makes a clickable link. <link> is used in the head to attach a stylesheet.- False Screen readers read alt text aloud, and it appears if the image fails to load. It is not optional.
- The structure of a page: what each thing is HTML says what something is. CSS says what it looks like.
<img>;<br>An image and a line break have no content between tags, so they have no closing tag.<!DOCTYPE html>→<html>→<head>→<title>→<body>The doctype comes first, then html. The head, with the title inside it, comes before the body.- <ol> <ol> is an ordered, numbered list. <ul> is an unordered list with bullets.
- On the browser tab The title lives in the head and is shown on the tab and in search results, not on the page itself.
- A ginger cat asleep on a computer keyboard Good alt text describes what the image shows, so someone who cannot see it gets the same information.
- A bulleted list with two items ul is an unordered list, shown with bullets, and each li is one item.
- True h1 is the page's main heading. h2 to h6 are for sections underneath it.
srcsrc is the source of the image file. href is for links, alt is the description.
Round 2: Quick Fire
- HTML is the structure and content, CSS is the appearance
- One CSS file can restyle every page, so the look is easy to change
Model answerHTML describes the structure and content of a page, while CSS controls its appearance. Keeping them separate means one CSS file can restyle every page of a site, so the whole look can be changed in one place.
- Screen readers read it to people who cannot see the image
- It is shown if the image fails to load
- It helps search engines understand the image
Model answerScreen readers read alt text aloud to people who cannot see the image, and it is shown in place of the image if it fails to load.
- The tags are nested wrongly: closed in the wrong order
- strong must close before p
Model answerThe tags are nested wrongly: they are closed in the wrong order. The strong tag opened last, so it must close first: <p>Hello <strong>world</strong></p>.
- A div is a block: a whole section that starts on a new line
- A span is inline: a small part inside a line of text
Model answerA div is a block element: a section of the page that starts on its own new line. A span is an inline element: a small part inside a line of text, such as one word.
Round 3: Big Think
- Screen reader users move around by heading, so add h1 and h2 in order
- Images need alt text so people who cannot see them get the information
- Links should describe where they go
- The page should be accessible to everyone, including disabled people
Model answerThe page is not accessible to everyone. Screen reader users move around a page by jumping from heading to heading, so the content needs a clear structure with an h1 and then h2 headings in order. Without alt text, a blind user gets no description of the images, so every image that carries meaning needs alt text. Links that say click here make no sense when a screen reader reads out a list of links, so each link should be descriptive and say where it goes, such as Read the trip letter.
- h1 for the page's main title
- p for paragraphs of text
- img, with alt text, for photos
- a href for links to other pages or sites
- ul or ol with li for lists
- h2 for sub headings, in order
- table, tr and td for data such as results
- A title in the head for the browser tab
Model answerFor a page about skateboarding I would put the page title in the head, so it shows on the browser tab, and use h1 for the main heading on the page. Each section would have an h2 sub heading, kept in order so screen readers can navigate. The text would go in p paragraphs, and photos of tricks would use img with alt text describing each one. A ul list with li items would list the kit you need, a table with tr and td would show my best scores, and a href links would point to a skate park's website.
This or That
<body>The body holds the visible content. The head holds facts about the page, such as its title and the stylesheet link.</p>A closing tag repeats the tag's name after a forward slash. A backslash is not part of HTML.<div>A div is a block section that can hold other elements. A span is a small inline section inside a line of text.<td>tr is a whole table row. td is one cell of data inside that row.- Hello world, with world in bold The browser treats tags as instructions and never shows them. strong makes its text bold.
- HyperText HTML is HyperText Markup Language: text that links to other text, marked up with tags.
<link rel="stylesheet" href="style.css">The link tag in the head attaches a .css file. A style tag holds CSS written inside the page and has no src.<h6>Headings run from h1, the most important, down to h6, the least important.
Memory Match
- A 2
<p>: A paragraph of text - B 1
<a>: A link to another page - C 6
<img>: A picture, which needs src and alt - D 5
<ol>: A numbered list - E 4
<td>: One cell in a table - F 3
<h1>: The most important heading