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.True or false: <meta> is an empty tag. (a) True (b) False
-
2.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>My pets</p>
<p>Fun facts</p>
<p>Our school trip</p> -
3.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>Fun facts</p> -->
<p>My pets</p> -
4.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing<br>Sky is blue<br>Rivers flow</p> - 5.True or false: <ul> shows bullet points. (a) False (b) True
-
6.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) Class 7 Blog (b) index.html (c) I like to read. (d) Match report - 7.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
- 8.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Modern (c) Markup (d) Mouse
- 9.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
- 10.True or false: a web browser opens web pages for us. (a) False (b) True
- 11.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
- 12.Which of these is a closing tag? (a) <title> (b) <h1> (c) </p> (d) <li>
- 13.Which of these is true of a web browser? (a) is where we type code (b) answers page requests (c) turns HTML into a page (d) stores a website’s files
-
14.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="350"> - 15.Which of these is an empty tag? (a) <li> (b) <b> (c) <br> (d) <p>
- 16.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) width (c) height (d) alt
- 17.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
-
18.🔗 Which address opens when you click this link?
<a href="games.html">Contact us</a> (a) contact.html (b) about.html (c) games.html (d) Contact us - 19.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 20.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
-
21.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>Try this poha.</p>
</body>
</html> (a) Planets (b) index.html (c) Try this poha. (d) Cricket Club - 22.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) src (d) alt
-
23.🔗 Where does this link open?
<a href="https://example.com">Art corner</a> (a) in a new tab (b) in the same tab - 24.True or false: <ol> is an unordered list. (a) True (b) False
-
25.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p>
<p>Hello, world!</p>
<p>My pets</p> (a) My pets (b) I love mangoes. (c) Fun facts (d) Hello, world! -
26.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Rain today</p>
<p>Fun facts</p>
<h4>The red kite</h4>
<p>My pets</p> -
27.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) Contact us (b) contact.html (c) maths.html (d) https://example.com - 28.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 29.True or false: a code editor colours code to help us. (a) True (b) False
-
30.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>The red kite</p> -->
<!-- <p>Rain today</p> --> - 31.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
- 32.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to make links (d) to show pictures
- 33.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 34.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <li> (d) <p>
- 35.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
-
36.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> --> (a) Cricket is fun. (b) Fun facts (c) Hello, world! -
37.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p>
<p>Our school trip</p>
<!-- <p>My pets</p> -->
<!-- <p>Hello, world!</p> --> - 38.True or false: <a> goes in the body. (a) True (b) False
- 39.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
- 40.Which of these is a closing tag? (a) <b> (b) <h1> (c) <title> (d) </b>
Answer key
- True
- 1
- 1
- 4
- True
- Class 7 Blog
- opens it in a new tab
- Markup
- Yes
- True
- 1
- </p>
- turns HTML into a page
- 350
- <br>
- height
- 6
- games.html
- No
- <ul>
- Cricket Club
- src
- in the same tab
- False
- Fun facts
- 2
- contact.html
- in the body
- True
- 1
- Yes
- to leave notes
- in the head
- <li>
- <
- Cricket is fun.
- 2
- True
- alt
- </b>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids