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.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>My pets</p> -->
<!-- <p>Cricket is fun.</p> --> - 2.Which of these is true of a web server? (a) saves our .html files (b) opens web pages for us (c) sends pages over the net (d) shows line numbers
-
3.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Rain today</p>
<h2>Our school trip</h2> - 4.Which of these is an opening tag? (a) </body> (b) <b> (c) </h1> (d) </b>
-
5.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Hello, world!</p>
<h3>I love mangoes.</h3> - 6.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <html> (d) <!DOCTYPE html>
- 7.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
- 8.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </html> (c) <head> (d) <!DOCTYPE html>
- 9.True or false: in <img>, width is read by screen readers. (a) True (b) False
- 10.True or false: in <img>, width sets how wide it is. (a) True (b) False
-
11.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine<br>Birds sing</p> - 12.🖼️ Which attribute of <img> tells which image to load? (a) width (b) src (c) alt (d) height
-
13.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) My Hobbies (b) I like to read. (c) Welcome! (d) index.html - 14.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a dot . (d) a hash #
- 15.True or false: <a> goes in the head. (a) True (b) False
-
16.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Orange</li>
<li>Mango</li>
</ol> (a) numbers (b) bullets - 17.Which of these is an empty tag? (a) <b> (b) <li> (c) <ul> (d) <hr>
- 18.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
19.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Mango</li>
<li>Grapes</li>
</ol> (a) bullets (b) numbers -
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="50"> (a) Our school bus (b) width (c) The full moon (d) moon.png - 21.True or false: HTML on its own cannot make tables. (a) True (b) False
- 22.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h1>? (a) <h4> (b) <h6> (c) <h3> (d) <h1>
- 23.📋 Which list suits a shopping list in any order? (a) <ul> (b) <ol> (c) <hr> (d) <br>
- 24.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h6>? (a) <h2> (b) <h3> (c) <h5> (d) <h6>
-
25.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Our school trip</p>
<p>The red kite</p> - 26.🌐 Which one stores a website’s files? (a) a code editor (b) a web browser (c) a web server
- 27.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 28.True or false: <h1> is an empty tag. (a) False (b) True
- 29.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h4>? (a) <h4> (b) <h3> (c) <h6> (d) <h1>
-
30.🔍 One closing tag is missing. Which one?
<small>My pets</small>
<b>Rain today
<h3>I love mangoes.</h3> (a) </strong> (b) </small> (c) </h3> (d) </b> -
31.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Rain today</p>
<!-- <p>I love mangoes.</p> -->
<p>Fun facts</p> -
32.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="100"> -
33.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Rain today</p> -->
<!-- <p>My pets</p> --> -
34.🔗 Which address opens when you click this link?
<a href="about.html">Art corner</a> (a) https://example.com (b) about.html (c) Art corner (d) contact.html -
35.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> --> (a) Hello, world! (b) The red kite (c) I love mangoes. -
36.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>Good morning!</p> --> - 37.Which of these goes in the head? (a) <table> (b) <ul> (c) <style> (d) <a>
- 38.📄 Can HTML on its own make tables? (a) Yes (b) No
- 39.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to colour it (d) to load it faster
-
40.🔗 Which words do you click on?
<a href="art.html">Visit the site</a> (a) Visit the site (b) art.html (c) Maths fun (d) href
Answer key
- 1
- sends pages over the net
- 2
- <b>
- 2
- <!DOCTYPE html>
- <h1>
- </html>
- False
- True
- 3
- src
- My Hobbies
- a slash /
- False
- numbers
- <hr>
- a closing tag
- numbers
- The full moon
- False
- <h6>
- <ul>
- <h6>
- 1
- a web server
- in the body
- False
- <h6>
- </b>
- 2
- 100
- 1
- about.html
- I love mangoes.
- 1
- <style>
- Yes
- to describe the image
- Visit the site
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids