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 <br> do? (a) starts a new line (b) makes text bold (c) adds a picture (d) makes a list
- 2.🔍 Which is the odd one out? (a) is where we type code (b) saves our .html files (c) answers page requests (d) colours code to help us
-
3.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p>
<p>My pets</p>
<p>Hello, world!</p> (a) Cricket is fun. (b) My pets (c) Hello, world! (d) Our school trip - 4.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
-
5.🔗 Which address opens when you click this link?
<a href="art.html">About us</a> (a) news.html (b) About us (c) art.html (d) quiz.html -
6.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) bus.jpg (b) tiger.jpg (c) Our school bus (d) fort.jpg - 7.True or false: a web browser opens web pages for us. (a) False (b) True
- 8.🖼️ Which attribute of <img> names the picture file? (a) alt (b) src (c) height (d) width
-
9.🔍 Which line is missing its closing tag?
line 1: <i>My pets</i>
line 2: <h2>The red kite
line 3: <p>Rain today</p> (a) line 1 (b) line 3 (c) line 2 -
10.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h2>I love mangoes.</h2>
<p>Hello, world!</p>
<p>I love mangoes.</p> - 11.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <p> (d) <meta charset="utf-8">
- 12.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 13.Which of these goes in the head? (a) <title> (b) <h1> (c) <a> (d) <ul>
-
14.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>My pets</p>
<p>The red kite</p>
<h2>I love mangoes.</h2> -
15.🔍 One closing tag is missing. Which one?
<strong>Hello, world!</strong>
<h1>My best friend
<i>Good morning!</i> (a) </strong> (b) </h1> (c) </i> (d) </h2> -
16.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>Cricket is fun.</p>
<!-- <p>My best friend</p> --> (a) Cricket is fun. (b) My best friend (c) Hello, world! - 17.Which of these is an empty tag? (a) <ul> (b) <b> (c) <li> (d) <meta>
-
18.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high</p> - 19.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
20.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>The red kite</p>
<p>Rain today</p>
<!-- <p>I love mangoes.</p> --> (a) I love mangoes. (b) The red kite (c) My pets (d) Rain today - 21.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 22.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <link rel="stylesheet"> (d) <h1>
-
23.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>My pets</p> -->
<p>Rain today</p>
<p>I love mangoes.</p>
<!-- <p>My best friend</p> --> -
24.📋 What number does the browser show next to “Litchi”?
<ol start="2">
<li>Jamun</li>
<li>Guava</li>
<li>Grapes</li>
<li>Mango</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> - 25.True or false: <li> has a closing tag. (a) False (b) True
-
26.🔍 One closing tag is missing. Which one?
<p>Rain today
<h1>Cricket is fun.</h1>
<h2>My pets</h2> (a) </small> (b) </p> (c) </h2> (d) </h1> - 27.True or false: a web browser hosts websites online. (a) True (b) False
- 28.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 4 (d) 6
- 29.True or false: <li> is an empty tag. (a) False (b) True
-
30.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) Our school bus (b) tiger.jpg (c) bus.jpg (d) fort.jpg - 31.Which of these goes in the head? (a) <table> (b) <a> (c) <h1> (d) <meta charset="utf-8">
- 32.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
- 33.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
- 34.🌐 Which one shows pages from the web? (a) a web browser (b) a code editor (c) a web server
- 35.True or false: <ol> lists steps in order. (a) False (b) True
- 36.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h1> (c) <br> (d) <h6>
-
37.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<p>Our school trip</p> -
38.🔗 Which address opens when you click this link?
<a href="https://example.com">Maths fun</a> (a) art.html (b) https://example.com (c) Maths fun (d) maths.html - 39.Which of these is true of a web browser? (a) opens web pages for us (b) answers page requests (c) colours code to help us (d) shows line numbers
- 40.Which of these goes in the head? (a) <ul> (b) <img> (c) <style> (d) <table>
Answer key
- starts a new line
- answers page requests
- Our school trip
- False
- art.html
- bus.jpg
- True
- src
- line 2
- 2
- <p>
- a closing tag
- <title>
- 3
- </h1>
- My best friend
- <meta>
- 2
- an opening tag
- I love mangoes.
- in the body
- <h1>
- 3
- 7
- True
- </p>
- False
- 6
- False
- bus.jpg
- <meta charset="utf-8">
- <ul>
- -->
- a web browser
- True
- <h1>
- 2
- https://example.com
- opens web pages for us
- <style>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids