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.💬 Does the browser show comments on the page? (a) Yes (b) No
- 2.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <title> (d) <img>
-
3.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Birds sing<br>Roses are red<br>Kites fly high<br>Stars shine</p> - 4.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 5.True or false: in <img>, alt sets how wide it is. (a) True (b) False
- 6.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
7.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Our school trip</p>
<p>My pets</p>
<p>Hello, world!</p> (a) Our school trip (b) My pets (c) Hello, world! (d) My best friend - 8.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <p> (d) <br>
- 9.💬 How does an HTML comment start? (a) /* (b) # (c) // (d) <!--
- 10.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
- 11.🏷️ Which is the closing tag for <u>? (a) <\u> (b) <u/> (c) </u> (d) <u>
-
12.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> -
13.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Welcome! (b) Here is my best one. (c) Space Facts (d) index.html -
14.🔗 Which words do you click on?
<a href="art.html">Play games</a> (a) href (b) About us (c) art.html (d) Play games - 15.🖼️ Which attribute of <img> tells which image to load? (a) src (b) alt (c) height (d) width
- 16.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) opens it in a new tab (d) makes it bold
- 17.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
- 18.Which of these goes in the head? (a) <ul> (b) <img> (c) <p> (d) <link rel="stylesheet">
- 19.True or false: <p> has a closing tag. (a) False (b) True
- 20.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </head>
- 21.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) height (c) src (d) width
-
22.🔍 Which line is missing its closing tag?
line 1: <h3>Cricket is fun.</h3>
line 2: <strong>The red kite</strong>
line 3: <p>Our school trip (a) line 1 (b) line 3 (c) line 2 -
23.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<p>Cricket is fun.</p> (a) Fun facts (b) Hello, world! (c) Cricket is fun. -
24.🔗 Which address opens when you click this link?
<a href="news.html">Play games</a> (a) Play games (b) games.html (c) news.html (d) quiz.html -
25.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Good morning!</p>
<p>Our school trip</p>
<p>Cricket is fun.</p>
<p>Rain today</p> - 26.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </html>
-
27.📋 Does this list show bullets or numbers?
<ol>
<li>Litchi</li>
<li>Grapes</li>
<li>Papaya</li>
</ol> (a) numbers (b) bullets -
28.🔍 One closing tag is missing. Which one?
<u>The red kite</u>
<h2>My pets
<small>Good morning!</small> (a) </h2> (b) </small> (c) </u> (d) </strong> -
29.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Banana</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Litchi</li>
</ul> -
30.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> --> (a) My best friend (b) I love mangoes. (c) Cricket is fun. - 31.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) shows pages from the web (d) colours code to help us
- 32.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h4>? (a) <h3> (b) <h2> (c) <h1> (d) <h4>
- 33.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
- 34.True or false: <li> shows bullet points. (a) False (b) True
-
35.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) https://example.com (b) Play games (c) About us (d) href - 36.Which of these goes in the head? (a) <title> (b) <h1> (c) <a> (d) <p>
-
37.🔗 Which words do you click on?
<a href="contact.html">Maths fun</a> (a) href (b) Maths fun (c) Art corner (d) contact.html -
38.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Fun facts</p>
<p>Hello, world!</p>
<p>Hello, world!</p>
<p>Hello, world!</p> - 39.Which of these goes in the head? (a) <p> (b) <ul> (c) <meta charset="utf-8"> (d) <table>
- 40.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
Answer key
- No
- <img>
- 5
- Yes
- False
- a closing tag
- My best friend
- <h1>
- <!--
- <ul>
- </u>
- 350
- Space Facts
- Play games
- src
- opens it in a new tab
- 6
- <link rel="stylesheet">
- True
- <!DOCTYPE html>
- alt
- line 3
- Hello, world!
- news.html
- 4
- <!DOCTYPE html>
- numbers
- </h2>
- 5
- Cricket is fun.
- shows pages from the web
- <h1>
- <ol>
- False
- Play games
- <title>
- Maths fun
- 1
- <meta charset="utf-8">
- in the body
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids