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 text will NOT show on the page?
<p>Good morning!</p>
<p>Hello, world!</p>
<p>Cricket is fun.</p>
<!-- <p>The red kite</p> --> (a) Good morning! (b) Hello, world! (c) Cricket is fun. (d) The red kite -
2.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h4>Rain today</h4>
<p>The red kite</p> - 3.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h5> or <h1>? (a) <h2> (b) <h5> (c) <h4> (d) <h1>
- 4.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
-
5.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high</p> -
6.🔍 One closing tag is missing. Which one?
<p>My pets</p>
<strong>The red kite
<h1>My best friend</h1> (a) </h1> (b) </p> (c) </strong> (d) </h2> -
7.🔍 One closing tag is missing. Which one?
<h1>Fun facts
<h2>Good morning!</h2>
<small>My pets</small> (a) </h1> (b) </small> (c) </b> (d) </h2> - 8.True or false: <title> has a closing tag. (a) True (b) False
-
9.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>Good morning!</h2>
<h4>Our school trip</h4>
<p>The red kite</p>
<p>My best friend</p> - 10.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
- 11.Which of these is true of a web browser? (a) opens web pages for us (b) saves our .html files (c) shows line numbers (d) sends pages over the net
-
12.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="350"> - 13.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
- 14.True or false: a web browser turns HTML into a page. (a) True (b) False
- 15.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h4>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
- 16.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h6> or <h1>? (a) <h3> (b) <h4> (c) <h6> (d) <h1>
- 17.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 18.Which of these is a closing tag? (a) <b> (b) <h1> (c) </p> (d) <p>
-
19.🔍 Which line is missing its closing tag?
line 1: <b>Good morning!</b>
line 2: <i>Rain today</i>
line 3: <h3>Our school trip (a) line 3 (b) line 1 (c) line 2 - 20.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h1>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
- 21.Which of these is true of a web browser? (a) is where we type code (b) turns HTML into a page (c) sends pages over the net (d) colours code to help us
-
22.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p> (a) Our school trip (b) Cricket is fun. (c) The red kite - 23.Which of these has a closing tag? (a) <input> (b) <br> (c) <li> (d) <meta>
-
24.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<p>The red kite</p>
<p>My best friend</p> (a) The red kite (b) My best friend (c) Hello, world! (d) Rain today - 25.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h1> or <h5>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>
-
26.🔍 One closing tag is missing. Which one?
<h3>My pets</h3>
<small>My best friend</small>
<u>Fun facts (a) </h3> (b) </u> (c) </em> (d) </small> -
27.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) A red kite (b) width (c) tiger.jpg (d) A tiger asleep - 28.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) on the browser tab (d) nowhere
- 29.True or false: a web server sends pages over the net. (a) False (b) True
- 30.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h1> or <h3>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
-
31.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>Cricket is fun.</h3>
<p>Rain today</p> - 32.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 33.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) alt (d) src
-
34.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>I love mangoes.</p>
<p>The red kite</p>
<p>Our school trip</p>
<p>Good morning!</p> - 35.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <img> (d) <p>
-
36.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) Planets (c) index.html (d) Space Facts - 37.True or false: in <img>, src is read by screen readers. (a) True (b) False
- 38.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
39.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> --> (a) Cricket is fun. (b) I love mangoes. (c) Our school trip (d) Good morning! -
40.🔗 Which address opens when you click this link?
<a href="art.html">Art corner</a> (a) quiz.html (b) Art corner (c) news.html (d) art.html
Answer key
- The red kite
- 2
- <h1>
- <ul>
- 2
- </strong>
- </h1>
- True
- 3
- <a>
- opens web pages for us
- 350
- <a href="about.html">
- True
- <h1>
- <h1>
- an empty tag
- </p>
- line 3
- <h1>
- turns HTML into a page
- Our school trip
- <li>
- Rain today
- <h6>
- </u>
- A tiger asleep
- on the browser tab
- True
- <h1>
- 2
- a closing tag
- alt
- 5
- <img>
- Space Facts
- False
- an opening tag
- Our school trip
- art.html
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids