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 is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) My Hobbies (b) Welcome! (c) body (d) Mars is red. - 2.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
-
3.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> -->
<p>Fun facts</p> (a) I love mangoes. (b) Our school trip (c) Fun facts - 4.Which of these is a closing tag? (a) <h1> (b) <body> (c) <title> (d) </body>
- 5.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 6.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 1 (d) 10
- 7.True or false: in <img>, src is read by screen readers. (a) False (b) True
- 8.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
- 9.True or false: <ul> lists things in any order. (a) True (b) False
- 10.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
-
11.🔗 Which address opens when you click this link?
<a href="about.html">Contact us</a> (a) Contact us (b) https://example.com (c) about.html (d) contact.html - 12.Which of these is true of a web server? (a) has an address bar (b) opens web pages for us (c) shows pages from the web (d) answers page requests
- 13.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h1>? (a) <h6> (b) <h3> (c) <h1> (d) <h5>
-
14.📋 What number does the browser show next to “Papaya”?
<ol start="3">
<li>Mango</li>
<li>Banana</li>
<li>Jamun</li>
<li>Guava</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> - 15.True or false: in <img>, width names the picture file. (a) True (b) False
- 16.Which of these goes in the head? (a) <p> (b) <table> (c) <link rel="stylesheet"> (d) <a>
- 17.True or false: <p> is an empty tag. (a) True (b) False
- 18.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
- 19.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <ul> (d) <hr>
- 20.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3/> (c) <h3> (d) </h3>
- 21.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as a new line (d) as 5 spaces
- 22.Which of these has a closing tag? (a) <hr> (b) <b> (c) <img> (d) <input>
- 23.True or false: a code editor opens web pages for us. (a) False (b) True
-
24.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Fun facts</p> -->
<p>Hello, world!</p> - 25.True or false: <input> has a closing tag. (a) True (b) False
-
26.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<p>Our school trip</p> (a) I love mangoes. (b) Hello, world! (c) My pets (d) Our school trip -
27.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
<p>Rain today</p> (a) My best friend (b) Cricket is fun. (c) Our school trip (d) Rain today - 28.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) has an address bar (d) colours code to help us
- 29.📝 What does <p> make? (a) a link (b) a picture (c) a paragraph (d) a table
- 30.🌐 Which one shows line numbers? (a) a code editor (b) a web browser (c) a web server
- 31.True or false: <style> goes in the head. (a) False (b) True
- 32.True or false: in <img>, width sets how wide it is. (a) False (b) True
- 33.📝 What does <br> do? (a) adds a picture (b) makes a list (c) makes text bold (d) starts a new line
- 34.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <img> (c) <h1> (d) <p>
-
35.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Litchi</li>
<li>Banana</li>
</ol> - 36.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
-
37.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Fun facts</p> -->
<p>The red kite</p>
<!-- <p>My best friend</p> --> - 38.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
-
39.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p> - 40.True or false: <meta> has a closing tag. (a) True (b) False
Answer key
- Welcome!
- href
- Our school trip
- </body>
- in the head
- 1
- False
- to leave notes
- True
- <li>
- about.html
- answers page requests
- <h1>
- 8
- False
- <link rel="stylesheet">
- False
- a slash /
- <ul>
- </h3>
- as one space
- <b>
- False
- 2
- False
- My pets
- Cricket is fun.
- has an address bar
- a paragraph
- a code editor
- True
- True
- starts a new line
- <meta charset="utf-8">
- 6
- a web browser
- 1
- <ul>
- 3
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids