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.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) hides the link (d) makes it bold
- 2.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h4>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
- 3.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
-
4.📋 What number does the browser show next to “Litchi”?
<ol start="2">
<li>Grapes</li>
<li>Litchi</li>
<li>Mango</li>
</ol> - 5.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
- 6.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
- 7.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
-
8.🔍 Which line is missing its closing tag?
line 1: <h3>Good morning!</h3>
line 2: <b>Hello, world!</b>
line 3: <i>Fun facts (a) line 1 (b) line 2 (c) line 3 - 9.📄 Can HTML on its own make a form? (a) Yes (b) No
-
10.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) index.html (b) Try this poha. (c) Easy snacks (d) Cricket Club -
11.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> --> - 12.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
13.📋 What number does the browser show next to “Guava”?
<ol start="3">
<li>Papaya</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Guava</li>
</ol> - 14.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <table> (c) <ul> (d) <a>
- 15.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 16.True or false: <ul> is one item of a list. (a) False (b) True
- 17.🔢 In a basic web page file, which comes first: “<head>” or “</body>”? (a) </body> (b) <head>
-
18.🔗 Which address opens when you click this link?
<a href="https://example.com">Maths fun</a> (a) Maths fun (b) art.html (c) https://example.com (d) maths.html - 19.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h3> or <h6>? (a) <h6> (b) <h2> (c) <h4> (d) <h3>
- 20.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
- 21.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
- 22.Which of these is true of a web browser? (a) shows line numbers (b) sends pages over the net (c) has an address bar (d) hosts websites online
-
23.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) bus.jpg (b) width (c) An old fort (d) Our school bus - 24.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Machine (c) Markup (d) Mouse
-
25.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="300"> (a) Birthday cake (b) A happy dog (c) cake.jpg (d) width -
26.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Space Facts (c) All about me (d) Thanks for visiting. - 27.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <title> (d) <p>
- 28.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) </body>
-
29.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) index.html (b) All about me (c) Art Gallery (d) Here is my best one. -
30.🔍 Which line is missing its closing tag?
line 1: <b>Good morning!</b>
line 2: <h1>Rain today
line 3: <h3>My best friend</h3> (a) line 2 (b) line 3 (c) line 1 - 31.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h3> (d) <h2>
- 32.🔍 Which is the odd one out? (a) hosts websites online (b) turns HTML into a page (c) opens web pages for us (d) has an address bar
-
33.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) href (b) Contact us (c) contact.html (d) About us -
34.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<p>Hello, world!</p> - 35.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
-
36.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>My pets</p>
<p>Hello, world!</p>
<p>The red kite</p> - 37.🔍 Which is the odd one out? (a) answers page requests (b) stores a website’s files (c) turns HTML into a page (d) sends pages over the net
- 38.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) turns HTML into a page (d) saves our .html files
- 39.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
-
40.🔍 Which line is missing its closing tag?
line 1: <b>Our school trip</b>
line 2: <strong>Rain today
line 3: <h3>My best friend</h3> (a) line 2 (b) line 3 (c) line 1
Answer key
- opens it in a new tab
- <h5>
- <ol>
- 3
- href
- True
- a line across the page
- line 3
- Yes
- Cricket Club
- 1
- an opening tag
- 6
- <link rel="stylesheet">
- No
- False
- <head>
- https://example.com
- <h6>
- <ol>
- False
- has an address bar
- Our school bus
- Markup
- Birthday cake
- Space Facts
- <p>
- <!DOCTYPE html>
- Art Gallery
- line 2
- <h5>
- hosts websites online
- About us
- 3
- <li>
- 3
- turns HTML into a page
- saves our .html files
- in the body
- line 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids