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 headings are in this code?
<h1>The red kite</h1>
<p>Rain today</p>
<p>My best friend</p> -
2.🔗 Where does this link open?
<a href="maths.html" target="_blank">Maths fun</a> (a) in the same tab (b) in a new tab - 3.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) element (d) address
-
4.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Banana</li>
</ol> (a) numbers (b) bullets -
5.🔠 How many headings are in this code?
<h1>My pets</h1>
<h2>Cricket is fun.</h2>
<h3>Good morning!</h3>
<p>Good morning!</p>
<h3>Good morning!</h3> - 6.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
-
7.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Litchi</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Guava</li>
</ol> - 8.Which of these is a closing tag? (a) <title> (b) <b> (c) </body> (d) <p>
-
9.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>I love mangoes.</h2>
<p>Good morning!</p>
<p>Fun facts</p> -
10.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Kites fly high</p> -
11.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> --> (a) The red kite (b) I love mangoes. (c) Hello, world! - 12.📄 Can HTML on its own make headings? (a) Yes (b) No
- 13.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) <h1/> (d) </h1>
- 14.True or false: <ul> is one item of a list. (a) False (b) True
- 15.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
-
16.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) body (b) We won by 5 runs. (c) My drawings (d) Cricket Club -
17.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Banana</li>
</ul> - 18.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) src (d) alt
- 19.💬 How does an HTML comment start? (a) # (b) /* (c) <!-- (d) //
-
20.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<p>My best friend</p> (a) My best friend (b) Rain today (c) Hello, world! (d) Cricket is fun. - 21.Which of these goes in the body? (a) <title> (b) <ul> (c) <meta charset="utf-8"> (d) <style>
- 22.Which of these is an opening tag? (a) </li> (b) <p> (c) </b> (d) </title>
-
23.🔍 Which line is missing its closing tag?
line 1: <u>The red kite
line 2: <small>Fun facts</small>
line 3: <i>Good morning!</i> (a) line 2 (b) line 1 (c) line 3 -
24.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>My pets</p>
<p>Cricket is fun.</p>
<h2>My pets</h2>
<p>My best friend</p> - 25.🌐 Which one colours code to help us? (a) a web server (b) a web browser (c) a code editor
-
26.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Rain today</p>
<p>My best friend</p>
<h2>Rain today</h2>
<h2>My pets</h2>
<h2>Good morning!</h2> - 27.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
-
28.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Mango</li>
<li>Banana</li>
</ol> - 29.True or false: <ol> is an ordered list. (a) True (b) False
-
30.📋 What number does the browser show next to “Litchi”?
<ol start="5">
<li>Banana</li>
<li>Litchi</li>
<li>Guava</li>
</ol> -
31.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> - 32.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h5>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
-
33.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) Space Facts (c) My drawings (d) index.html - 34.Which of these is a closing tag? (a) <p> (b) <li> (c) <title> (d) </li>
-
35.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Fun facts</p>
<p>Fun facts</p>
<h2>Cricket is fun.</h2>
<p>Our school trip</p> - 36.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
37.🔗 Which words do you click on?
<a href="quiz.html">School news</a> (a) Take the quiz (b) School news (c) quiz.html (d) href -
38.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>Fun facts</p>
<p>I love mangoes.</p>
<!-- <p>My pets</p> --> - 39.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) width (c) height (d) src
- 40.True or false: HTML on its own can keep a high score. (a) False (b) True
Answer key
- 1
- in a new tab
- element
- numbers
- 4
- starts a new line
- 3
- </body>
- 2
- 2
- Hello, world!
- Yes
- </h1>
- False
- <li>
- My drawings
- 2
- alt
- <!--
- Rain today
- <ul>
- <p>
- line 1
- 4
- a code editor
- 3
- True
- 3
- True
- 6
- 100
- <h1>
- Space Facts
- </li>
- 4
- a closing tag
- School news
- 3
- width
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids