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 address opens when you click this link?
<a href="about.html">Contact us</a> (a) https://example.com (b) contact.html (c) about.html (d) Contact us - 2.🌍 Which program shows a web page to us? (a) a web browser (b) a music player (c) a calculator (d) a paint program
-
3.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Litchi</li>
<li>Papaya</li>
</ul> -
4.📋 What number does the browser show next to “Mango”?
<ol>
<li>Papaya</li>
<li>Banana</li>
<li>Litchi</li>
<li>Orange</li>
<li>Jamun</li>
<li>Mango</li>
</ol> - 5.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h3>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
-
6.🔗 Where does this link open?
<a href="maths.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 7.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
- 8.True or false: <li> is an empty tag. (a) True (b) False
- 9.Which of these is true of a web server? (a) saves our .html files (b) colours code to help us (c) sends pages over the net (d) opens web pages for us
- 10.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h6> or <h3>? (a) <h4> (b) <h2> (c) <h6> (d) <h3>
- 11.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 12.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the body (d) the doctype
- 13.True or false: in <img>, height shows if the image fails. (a) True (b) False
-
14.🔍 One closing tag is missing. Which one?
<h3>Our school trip</h3>
<p>My pets</p>
<em>Fun facts (a) </em> (b) </p> (c) </u> (d) </h3> - 15.💬 How does an HTML comment end? (a) >> (b) */ (c) --> (d) //
- 16.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i/> (c) </i> (d) <i>
- 17.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
- 18.True or false: <ul> is an unordered list. (a) False (b) True
- 19.🏷️ Which is the closing tag for <u>? (a) <u> (b) <u/> (c) </u> (d) <\u>
- 20.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
21.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<p>The red kite</p>
<p>Cricket is fun.</p> (a) I love mangoes. (b) The red kite (c) Good morning! (d) Cricket is fun. -
22.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Good morning!</h2>
<h2>Rain today</h2>
<p>Our school trip</p>
<p>My pets</p>
<p>Hello, world!</p> - 23.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 24.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h6>? (a) <h1> (b) <h4> (c) <h6> (d) <h3>
-
25.🔍 One closing tag is missing. Which one?
<b>Hello, world!</b>
<p>Good morning!
<small>I love mangoes.</small> (a) </b> (b) </small> (c) </h1> (d) </p> - 26.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
-
27.📋 What number does the browser show next to “Guava”?
<ol>
<li>Mango</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Guava</li>
<li>Orange</li>
</ol> -
28.🔍 Which line is missing its closing tag?
line 1: <u>My best friend</u>
line 2: <b>I love mangoes.
line 3: <h2>Hello, world!</h2> (a) line 3 (b) line 2 (c) line 1 - 29.True or false: a code editor shows line numbers. (a) False (b) True
- 30.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
-
31.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Good morning!</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My pets</p> --> - 32.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 33.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
- 34.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
35.🔍 One closing tag is missing. Which one?
<h1>The red kite</h1>
<strong>Hello, world!</strong>
<small>Good morning! (a) </strong> (b) </small> (c) </u> (d) </h1> -
36.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Rain today</p> --> -
37.🔗 Where does this link open?
<a href="contact.html" target="_blank">School news</a> (a) in a new tab (b) in the same tab -
38.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) map.png (b) A tiger asleep (c) kite.png (d) tiger.jpg -
39.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing<br>Sky is blue<br>Kites fly high<br>Rivers flow</p> - 40.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <body> (c) <!DOCTYPE html> (d) <html>
Answer key
- about.html
- a web browser
- 3
- 6
- <h1>
- in a new tab
- a web server
- False
- sends pages over the net
- <h2>
- an empty tag
- the body
- False
- </em>
- -->
- </i>
- <ol>
- True
- </u>
- Yes
- Good morning!
- 4
- in the head
- <h1>
- </p>
- <a>
- 4
- line 2
- True
- <ul>
- 2
- an opening tag
- <ul>
- an opening tag
- </small>
- 1
- in a new tab
- tiger.jpg
- 5
- <!DOCTYPE html>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids