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.Which of these is a closing tag? (a) <body> (b) <p> (c) <title> (d) </b>
- 2.📋 Which list tag is an ordered list? (a) <ol> (b) <li> (c) <ul>
-
3.🔍 One closing tag is missing. Which one?
<b>Cricket is fun.</b>
<u>Rain today
<h2>Hello, world!</h2> (a) </b> (b) </h2> (c) </u> (d) </small> - 4.Which of these is true of a web server? (a) turns HTML into a page (b) shows line numbers (c) hosts websites online (d) has an address bar
-
5.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> --> - 6.Which of these is an opening tag? (a) </h1> (b) </body> (c) <title> (d) </li>
- 7.🖼️ Which attribute of <img> names the picture file? (a) alt (b) width (c) height (d) src
- 8.Which of these is an empty tag? (a) <img> (b) <ul> (c) <h1> (d) <p>
-
9.🔗 Which address opens when you click this link?
<a href="art.html">Art corner</a> (a) Art corner (b) quiz.html (c) art.html (d) news.html -
10.🔍 Which line is missing its closing tag?
line 1: <p>My pets</p>
line 2: <small>Fun facts
line 3: <h1>The red kite</h1> (a) line 1 (b) line 2 (c) line 3 - 11.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
- 12.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
- 13.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
-
14.🔍 One closing tag is missing. Which one?
<h1>Hello, world!</h1>
<strong>The red kite</strong>
<p>Rain today (a) </small> (b) </p> (c) </h1> (d) </strong> -
15.🔍 Which line is missing its closing tag?
line 1: <h2>Our school trip
line 2: <h3>The red kite</h3>
line 3: <h1>Rain today</h1> (a) line 1 (b) line 3 (c) line 2 - 16.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h6> (d) <h1>
- 17.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
18.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="300"> - 19.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
- 20.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) ( (d) {
-
21.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> -->
<p>The red kite</p>
<p>Hello, world!</p> - 22.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
-
23.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Guava</li>
<li>Orange</li>
<li>Papaya</li>
</ul> -
24.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>The red kite</p>
<h2>Rain today</h2>
<h2>Hello, world!</h2> - 25.True or false: in <img>, alt tells which image to load. (a) True (b) False
- 26.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
-
27.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine<br>Kites fly high<br>Birds sing<br>Roses are red</p> - 28.🌐 Which one colours code to help us? (a) a web browser (b) a web server (c) a code editor
-
29.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<!-- <p>Our school trip</p> -->
<p>Fun facts</p> - 30.Which of these is true of a code editor? (a) sends pages over the net (b) colours code to help us (c) has an address bar (d) shows pages from the web
- 31.True or false: <h1> is an empty tag. (a) False (b) True
-
32.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> - 33.True or false: <img> goes in the body. (a) False (b) True
-
34.🔍 One closing tag is missing. Which one?
<h3>Hello, world!</h3>
<p>I love mangoes.
<strong>Fun facts</strong> (a) </strong> (b) </h2> (c) </p> (d) </h3> - 35.Which of these is a closing tag? (a) <h1> (b) <b> (c) </title> (d) <li>
- 36.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 37.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) src (d) width
- 38.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
-
39.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<h2>My pets</h2>
<h2>My best friend</h2> -
40.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Hello, world!</p>
<h3>Our school trip</h3>
<h3>The red kite</h3>
<h2>Cricket is fun.</h2>
Answer key
- </b>
- <ol>
- </u>
- hosts websites online
- 1
- <title>
- src
- <img>
- art.html
- line 2
- <ul>
- to leave notes
- in the body
- </p>
- line 1
- <h1>
- No
- 300
- <a>
- <
- 3
- 6
- 4
- 2
- False
- <a href="about.html">
- 5
- a code editor
- 2
- colours code to help us
- False
- 300
- True
- </p>
- </title>
- has a closing tag
- src
- True
- 2
- 4
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids