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 true of a code editor? (a) turns HTML into a page (b) shows line numbers (c) sends pages over the net (d) shows pages from the web
- 2.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h6> or <h1>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
-
3.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing<br>Rivers flow</p> - 4.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h4> or <h6>? (a) <h2> (b) <h4> (c) <h6> (d) <h1>
-
5.🔗 Where does this link open?
<a href="contact.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 6.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h1>? (a) <h2> (b) <h1> (c) <h4> (d) <h5>
- 7.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
- 8.True or false: a web server opens web pages for us. (a) False (b) True
- 9.Which of these has a closing tag? (a) <p> (b) <meta> (c) <img> (d) <br>
-
10.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Orange</li>
<li>Grapes</li>
</ol> (a) numbers (b) bullets - 11.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 12.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 13.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
- 14.True or false: <p> goes in the head. (a) True (b) False
- 15.Which of these goes in the head? (a) <ul> (b) <title> (c) <table> (d) <h1>
- 16.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
-
17.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Good morning!</p>
<p>Hello, world!</p> (a) The red kite (b) Hello, world! (c) Good morning! - 18.Which of these is a closing tag? (a) <title> (b) <b> (c) <p> (d) </p>
-
19.🔗 Which address opens when you click this link?
<a href="maths.html">Play games</a> (a) news.html (b) art.html (c) maths.html (d) Play games - 20.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
-
21.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) href (b) Visit the site (c) games.html (d) Contact us -
22.🔗 Where does this link open?
<a href="https://example.com">School news</a> (a) in the same tab (b) in a new tab -
23.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>The red kite</p>
<!-- <p>My best friend</p> --> - 24.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) alt (c) src (d) height
- 25.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h6>? (a) <h5> (b) <h2> (c) <h6> (d) <h1>
- 26.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
-
27.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Cricket is fun.</p>
<h2>Cricket is fun.</h2>
<p>Hello, world!</p>
<p>The red kite</p> -
28.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p> - 29.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) on the browser tab (d) at the bottom
-
30.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My pets</p> -->
<p>I love mangoes.</p> -
31.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Kites fly high<br>Rivers flow<br>Birds sing</p> - 32.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
- 33.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
- 34.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
35.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets - 36.Which of these is an opening tag? (a) </li> (b) </b> (c) <li> (d) </title>
- 37.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
- 38.True or false: in <img>, width shows if the image fails. (a) False (b) True
-
39.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>My drawings</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) My drawings (c) Thanks for visiting. (d) Riya’s Recipes - 40.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) hosts websites online (d) is where we type code
Answer key
- shows line numbers
- <h6>
- 3
- <h6>
- in a new tab
- <h1>
- True
- False
- <p>
- numbers
- in the body
- an opening tag
- <a href="about.html">
- False
- <title>
- a web server
- The red kite
- </p>
- maths.html
- -->
- Contact us
- in the same tab
- 2
- height
- <h1>
- in the head
- 2
- 4
- on the browser tab
- 2
- 5
- <ul>
- <ol>
- an empty tag
- bullets
- <li>
- alt
- False
- Riya’s Recipes
- hosts websites online
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids