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 of these is true of a web server? (a) colours code to help us (b) is where we type code (c) sends pages over the net (d) saves our .html files
- 2.🔢 In a basic web page file, which comes LAST? (a) <head> (b) </body> (c) </html> (d) </head>
- 3.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
-
4.🔗 Which words do you click on?
<a href="maths.html">Art corner</a> (a) School news (b) Art corner (c) href (d) maths.html - 5.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
- 6.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
-
7.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high<br>Roses are red<br>Birds sing<br>Rivers flow</p> -
8.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Our school trip</p>
<p>Good morning!</p>
<p>Fun facts</p> (a) Good morning! (b) Our school trip (c) Fun facts (d) Rain today - 9.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h5>? (a) <h2> (b) <h1> (c) <h6> (d) <h5>
-
10.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p>
<p>Good morning!</p> (a) My pets (b) Hello, world! (c) Good morning! (d) Cricket is fun. -
11.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="50"> - 12.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h5>? (a) <h1> (b) <h2> (c) <h5> (d) <h4>
- 13.True or false: <img> is an empty tag. (a) False (b) True
-
14.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="300"> (a) A tiger asleep (b) An old fort (c) fort.jpg (d) width - 15.True or false: <img> has a closing tag. (a) True (b) False
-
16.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h4>Good morning!</h4>
<p>My pets</p>
<p>The red kite</p>
<p>The red kite</p> - 17.📄 What is the first line of an HTML5 page? (a) <head> (b) <!DOCTYPE html> (c) <body> (d) <html>
- 18.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
-
19.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>My best friend</p>
<h2>Good morning!</h2>
<h2>Fun facts</h2>
<h2>My pets</h2>
<h2>Good morning!</h2> - 20.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 21.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
- 22.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h2> or <h3>? (a) <h5> (b) <h3> (c) <h2> (d) <h4>
- 23.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h5>? (a) <h3> (b) <h5> (c) <h2> (d) <h6>
- 24.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) at the bottom (d) in a big heading
-
25.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Our school trip</p> -->
<p>My best friend</p>
<p>I love mangoes.</p>
<p>Cricket is fun.</p> - 26.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h3>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
-
27.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Space Facts (b) Thanks for visiting. (c) body (d) Easy snacks -
28.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p>
<p>Good morning!</p>
<!-- <p>Fun facts</p> --> -
29.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>Cricket is fun.</h2>
<p>Good morning!</p>
<h2>The red kite</h2> - 30.Which of these is an empty tag? (a) <p> (b) <title> (c) <br> (d) <ul>
- 31.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as 5 spaces (c) as one space (d) as a dot
- 32.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
- 33.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 34.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 35.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h4>? (a) <h2> (b) <h1> (c) <h6> (d) <h4>
-
36.🔗 Where does this link open?
<a href="about.html">About us</a> (a) in the same tab (b) in a new tab - 37.💬 How does an HTML comment end? (a) // (b) >> (c) */ (d) -->
-
38.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> --> (a) Hello, world! (b) Good morning! (c) I love mangoes. -
39.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>My pets</p>
<h4>I love mangoes.</h4> -
40.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) index.html (c) Cricket Club (d) Planets
Answer key
- sends pages over the net
- </html>
- <ol>
- Art corner
- True
- <a>
- 5
- Rain today
- <h1>
- Cricket is fun.
- 50
- <h1>
- True
- An old fort
- False
- 2
- <!DOCTYPE html>
- 1
- 2
- Yes
- Yes
- <h5>
- <h2>
- on the browser tab
- 3
- <h1>
- Easy snacks
- 2
- 2
- <br>
- as one space
- a web server
- a closing tag
- an empty tag
- <h6>
- in the same tab
- -->
- I love mangoes.
- 2
- Cricket Club
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids