HTML Worksheet: Practice Test
Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.
NameDateTime takenScore ___ / 40
-
1.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) href (b) contact.html (c) About us (d) Play games -
2.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>Mars is red.</p>
</body>
</html> (a) My drawings (b) Space Facts (c) Mars is red. (d) index.html -
3.🔗 Where does this link open?
<a href="art.html">Art corner</a> (a) in a new tab (b) in the same tab - 4.True or false: in <img>, src sets how tall it is. (a) False (b) True
- 5.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 6.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) alt (d) height
- 7.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
- 8.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
-
9.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Good morning!</p>
<p>Cricket is fun.</p> - 10.📝 What does <p> make? (a) a paragraph (b) a picture (c) a table (d) a link
- 11.True or false: a web browser shows pages from the web. (a) False (b) True
- 12.True or false: <hr> is an empty tag. (a) True (b) False
-
13.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>My pets</p>
<p>My best friend</p>
<h2>Fun facts</h2> - 14.🔍 Which is the odd one out? (a) shows line numbers (b) shows pages from the web (c) colours code to help us (d) saves our .html files
- 15.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h3>? (a) <h3> (b) <h6> (c) <h5> (d) <h1>
- 16.Which of these is true of a code editor? (a) has an address bar (b) shows pages from the web (c) colours code to help us (d) hosts websites online
- 17.True or false: <hr> has a closing tag. (a) True (b) False
-
18.🔗 Which address opens when you click this link?
<a href="https://example.com">Take the quiz</a> (a) maths.html (b) art.html (c) https://example.com (d) Take the quiz - 19.True or false: <li> shows bullet points. (a) False (b) True
- 20.📄 Can HTML on its own make tables? (a) Yes (b) No
- 21.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to describe the image (d) to colour it
- 22.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
- 23.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <h1> (d) <br>
- 24.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <img> (c) <ul> (d) <table>
-
25.🔗 Where does this link open?
<a href="maths.html">Play games</a> (a) in the same tab (b) in a new tab - 26.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
27.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Our school trip</p>
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p>
<p>The red kite</p> - 28.True or false: a web browser stores a website’s files. (a) True (b) False
-
29.🔍 One closing tag is missing. Which one?
<u>Cricket is fun.
<small>Our school trip</small>
<b>I love mangoes.</b> (a) </u> (b) </h3> (c) </b> (d) </small> - 30.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) HyperText (c) Home Text (d) High Tech
-
31.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p>
<p>Good morning!</p> - 32.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a slash / (d) a dot .
- 33.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <hr> (d) <br>
-
34.🔗 Which address opens when you click this link?
<a href="games.html">Take the quiz</a> (a) about.html (b) Take the quiz (c) games.html (d) contact.html - 35.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
-
36.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>My pets</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p>
<!-- <p>Our school trip</p> --> -
37.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high</p> -
38.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>My best friend</p> -->
<!-- <p>Fun facts</p> --> -
39.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h4>Rain today</h4>
<p>The red kite</p> -
40.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="50"> (a) A tiger asleep (b) width (c) An old fort (d) fort.jpg
Answer key
- Play games
- Space Facts
- in the same tab
- False
- No
- alt
- a web browser
- <ol>
- 1
- a paragraph
- True
- True
- 3
- shows pages from the web
- <h1>
- colours code to help us
- False
- https://example.com
- False
- Yes
- to describe the image
- <h1>
- <h1>
- <link rel="stylesheet">
- in the same tab
- Yes
- 3
- False
- </u>
- HyperText
- 2
- a slash /
- <ul>
- games.html
- a code editor
- 1
- 2
- 1
- 2
- An old fort
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids