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 heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h5>? (a) <h6> (b) <h1> (c) <h2> (d) <h5>
- 2.Which of these is true of a web server? (a) stores a website’s files (b) has an address bar (c) colours code to help us (d) shows line numbers
- 3.Which of these is true of a web browser? (a) is where we type code (b) hosts websites online (c) colours code to help us (d) shows pages from the web
-
4.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red</p> - 5.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) src (d) width
- 6.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
- 7.True or false: <ul> is an unordered list. (a) False (b) True
-
8.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> --> (a) Good morning! (b) Hello, world! (c) I love mangoes. - 9.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
- 10.Which of these is an empty tag? (a) <ul> (b) <p> (c) <img> (d) <li>
- 11.True or false: a web server hosts websites online. (a) False (b) True
- 12.Which of these is a closing tag? (a) <b> (b) <title> (c) <h1> (d) </p>
- 13.True or false: a web browser shows line numbers. (a) True (b) False
- 14.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
-
15.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>My best friend</p>
<!-- <p>Rain today</p> --> -
16.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> -
17.🔗 Which address opens when you click this link?
<a href="about.html">Take the quiz</a> (a) https://example.com (b) Take the quiz (c) about.html (d) contact.html - 18.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
-
19.🔗 Which address opens when you click this link?
<a href="maths.html">Visit the site</a> (a) Visit the site (b) news.html (c) maths.html (d) art.html - 20.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <h1> (c) <title> (d) <style>
-
21.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="200"> - 22.Which of these is an opening tag? (a) </li> (b) </title> (c) </h1> (d) <title>
-
23.🔍 One closing tag is missing. Which one?
<h1>Fun facts
<em>Hello, world!</em>
<h2>I love mangoes.</h2> (a) </em> (b) </strong> (c) </h1> (d) </h2> - 24.True or false: <table> goes in the head. (a) True (b) False
- 25.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
- 26.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) </html>
- 27.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
-
28.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Our school trip</p>
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<!-- <p>My pets</p> --> -
29.🔗 Which address opens when you click this link?
<a href="maths.html">Take the quiz</a> (a) art.html (b) news.html (c) Take the quiz (d) maths.html - 30.Which of these is true of a web server? (a) hosts websites online (b) opens web pages for us (c) saves our .html files (d) colours code to help us
- 31.True or false: a code editor is where we type code. (a) True (b) False
-
32.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) Space Facts (c) Welcome! (d) index.html - 33.True or false: <h1> is an empty tag. (a) True (b) False
- 34.📝 What does <p> make? (a) a picture (b) a link (c) a paragraph (d) a table
-
35.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine</p> - 36.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h6>? (a) <h6> (b) <h2> (c) <h3> (d) <h1>
-
37.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="400"> -
38.🔗 Which address opens when you click this link?
<a href="art.html">Maths fun</a> (a) news.html (b) quiz.html (c) Maths fun (d) art.html - 39.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <pic> (d) <img>
- 40.True or false: <ul> lists things in any order. (a) False (b) True
Answer key
- <h1>
- stores a website’s files
- shows pages from the web
- 2
- src
- in the body
- True
- Good morning!
- opens it in a new tab
- <img>
- True
- </p>
- False
- <ol>
- 1
- 100
- about.html
- 1
- maths.html
- <h1>
- 200
- <title>
- </h1>
- False
- False
- </html>
- <ol>
- 3
- maths.html
- hosts websites online
- True
- Space Facts
- False
- a paragraph
- 2
- <h6>
- 400
- art.html
- <img>
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids