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.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 2.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <p> (d) <ol>
- 3.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) alt (d) height
-
4.🔍 Which line is missing its closing tag?
line 1: <u>Rain today</u>
line 2: <h2>I love mangoes.
line 3: <strong>Hello, world!</strong> (a) line 2 (b) line 1 (c) line 3 - 5.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
-
6.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>I love mangoes.</p> -->
<p>My best friend</p>
<p>Hello, world!</p> (a) Hello, world! (b) My pets (c) My best friend (d) I love mangoes. - 7.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
- 8.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 9.Which of these is true of a code editor? (a) hosts websites online (b) shows line numbers (c) shows pages from the web (d) sends pages over the net
-
10.🔍 One closing tag is missing. Which one?
<h1>Hello, world!</h1>
<small>Cricket is fun.
<em>I love mangoes.</em> (a) </h2> (b) </h1> (c) </em> (d) </small> - 11.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h6> or <h5>? (a) <h4> (b) <h5> (c) <h2> (d) <h6>
- 12.Which of these goes in the head? (a) <a> (b) <img> (c) <ul> (d) <title>
- 13.🔢 In a basic web page file, which comes first: “</body>” or “</html>”? (a) </html> (b) </body>
-
14.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>My pets</p>
<p>I love mangoes.</p>
<h4>The red kite</h4>
<p>Good morning!</p> -
15.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue<br>Stars shine</p> - 16.Which of these is an opening tag? (a) </h1> (b) <b> (c) </body> (d) </b>
- 17.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
-
18.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Orange</li>
</ul> (a) numbers (b) bullets -
19.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Our school trip</p>
<p>Fun facts</p>
<p>Cricket is fun.</p> - 20.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
-
21.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) Space Facts (b) I like to read. (c) Match report (d) body -
22.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>My pets</p>
<p>I love mangoes.</p>
<p>My best friend</p> - 23.Which of these is an empty tag? (a) <li> (b) <h1> (c) <ul> (d) <img>
- 24.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
- 25.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
26.📄 What does the browser tab show for 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) Easy snacks (c) Thanks for visiting. (d) index.html - 27.True or false: in <img>, width describes the picture. (a) True (b) False
- 28.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a table (d) a picture
-
29.🔗 Which words do you click on?
<a href="maths.html">Contact us</a> (a) maths.html (b) Contact us (c) href (d) Visit the site -
30.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Rivers flow</p> -
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="50"> (a) width (b) Our school bus (c) The full moon (d) moon.png - 32.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
-
33.🔍 Which line is missing its closing tag?
line 1: <strong>Fun facts</strong>
line 2: <h1>My best friend
line 3: <em>Hello, world!</em> (a) line 1 (b) line 2 (c) line 3 - 34.True or false: in <img>, alt describes the picture. (a) True (b) False
- 35.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
- 36.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
- 37.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
- 38.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
- 39.True or false: <p> goes in the body. (a) True (b) False
- 40.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
Answer key
- Yes
- <li>
- width
- line 2
- <a href="about.html">
- I love mangoes.
- a web browser
- a closing tag
- shows line numbers
- </small>
- <h2>
- <title>
- </body>
- 2
- 3
- <b>
- <ol>
- bullets
- 1
- in the head
- Match report
- 4
- <img>
- False
- an empty tag
- Space Facts
- False
- a line across the page
- Contact us
- 3
- The full moon
- <ul>
- line 2
- True
- a web browser
- True
- a web server
- 6
- True
- has a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids