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.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Stars shine<br>Rivers flow<br>Roses are red<br>Sky is blue</p> - 2.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 3.True or false: <ul> goes in the body. (a) False (b) True
- 4.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
- 5.Which of these is an empty tag? (a) <b> (b) <img> (c) <li> (d) <title>
- 6.🏷️ Which is the closing tag for <i>? (a) <i/> (b) <\i> (c) </i> (d) <i>
-
7.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing<br>Sky is blue</p> - 8.🏷️ Which is the closing tag for <u>? (a) <\u> (b) <u/> (c) </u> (d) <u>
- 9.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
- 10.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <p> (d) <pic>
- 11.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) width (d) src
- 12.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
-
13.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Mango</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers -
14.🔍 Which line is missing its closing tag?
line 1: <h1>Hello, world!</h1>
line 2: <h2>Our school trip</h2>
line 3: <i>The red kite (a) line 2 (b) line 1 (c) line 3 - 15.Which of these is true of a code editor? (a) answers page requests (b) is where we type code (c) shows pages from the web (d) sends pages over the net
- 16.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
- 17.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
- 18.True or false: <input> has a closing tag. (a) True (b) False
-
19.💬 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>Hello, world!</p> -
20.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> -
21.🔍 Which line is missing its closing tag?
line 1: <small>I love mangoes.</small>
line 2: <h3>Rain today
line 3: <i>The red kite</i> (a) line 1 (b) line 2 (c) line 3 - 22.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h5> or <h6>? (a) <h3> (b) <h5> (c) <h4> (d) <h6>
-
23.📋 What number does the browser show next to “Orange”?
<ol>
<li>Mango</li>
<li>Orange</li>
<li>Papaya</li>
</ol> -
24.📋 What number does the browser show next to “Guava”?
<ol start="7">
<li>Banana</li>
<li>Guava</li>
<li>Jamun</li>
<li>Papaya</li>
</ol> -
25.🔍 One closing tag is missing. Which one?
<strong>I love mangoes.</strong>
<p>The red kite</p>
<i>My pets (a) </p> (b) </i> (c) </strong> (d) </h3> -
26.🔍 One closing tag is missing. Which one?
<strong>My best friend
<u>The red kite</u>
<i>I love mangoes.</i> (a) </i> (b) </strong> (c) </h2> (d) </u> - 27.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
- 28.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
- 29.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) hides the link (d) makes it bold
-
30.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h3>The red kite</h3>
<h2>Good morning!</h2>
<p>My best friend</p>
<h4>Good morning!</h4> - 31.True or false: in <img>, width names the picture file. (a) True (b) False
- 32.📝 What do we need to write HTML? (a) a microphone (b) a paintbrush (c) a plain text editor (d) a printer
- 33.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) height (c) alt (d) width
-
34.🔍 One closing tag is missing. Which one?
<b>Rain today</b>
<u>Cricket is fun.</u>
<em>My pets (a) </b> (b) </h1> (c) </u> (d) </em> - 35.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 36.True or false: in <img>, height sets how wide it is. (a) True (b) False
- 37.Which of these is an opening tag? (a) </li> (b) </h1> (c) <title> (d) </body>
-
38.🔗 Which address opens when you click this link?
<a href="quiz.html">Contact us</a> (a) games.html (b) about.html (c) quiz.html (d) Contact us -
39.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>Good morning!</p> -->
<p>My pets</p> (a) Good morning! (b) My best friend (c) My pets -
40.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Litchi</li>
<li>Orange</li>
</ul> (a) bullets (b) numbers
Answer key
- 5
- in the head
- True
- <!--
- <img>
- </i>
- 3
- </u>
- <li>
- <img>
- src
- in the head
- bullets
- line 3
- is where we type code
- 6
- Yes
- False
- 3
- 200
- line 2
- <h6>
- 2
- 8
- </i>
- </strong>
- a slash /
- <!DOCTYPE html>
- opens it in a new tab
- 4
- False
- a plain text editor
- alt
- </em>
- Yes
- False
- <title>
- quiz.html
- Good morning!
- bullets
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids