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 one sends pages over the net? (a) a web server (b) a web browser (c) a code editor
- 2.True or false: <ol> lists things in any order. (a) True (b) False
- 3.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) height (d) src
- 4.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
5.🔗 Which words do you click on?
<a href="games.html">Maths fun</a> (a) games.html (b) href (c) Maths fun (d) Art corner - 6.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h2> or <h1>? (a) <h5> (b) <h6> (c) <h1> (d) <h2>
- 7.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
-
8.🔍 Which line is missing its closing tag?
line 1: <u>Our school trip</u>
line 2: <b>Good morning!</b>
line 3: <small>I love mangoes. (a) line 1 (b) line 3 (c) line 2 -
9.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Fun facts</p>
<p>Our school trip</p> - 10.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
-
11.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>My best friend</h2>
<h2>Rain today</h2> - 12.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 13.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
- 14.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
- 15.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6
-
16.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Banana</li>
<li>Papaya</li>
<li>Mango</li>
<li>Grapes</li>
<li>Litchi</li>
</ul> -
17.🔍 Which line is missing its closing tag?
line 1: <small>Hello, world!</small>
line 2: <em>I love mangoes.
line 3: <i>Fun facts</i> (a) line 1 (b) line 3 (c) line 2 -
18.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Cricket is fun.</p>
<!-- <p>Fun facts</p> -->
<p>Rain today</p> (a) My pets (b) Cricket is fun. (c) Fun facts (d) Rain today - 19.🔢 In a basic web page file, which comes first: “<body>” or “<head>”? (a) <head> (b) <body>
- 20.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
21.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Fun facts</p>
<!-- <p>Our school trip</p> --> (a) Fun facts (b) Our school trip (c) Good morning! - 22.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
- 23.📄 Can HTML on its own make links to pages? (a) Yes (b) No
- 24.True or false: a web server hosts websites online. (a) False (b) True
-
25.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Rivers flow<br>Kites fly high<br>Sky is blue</p> - 26.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <b> (d) <img>
- 27.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Laptop (d) Language
-
28.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Fun facts</p>
<p>My pets</p> - 29.Which of these goes in the body? (a) <title> (b) <table> (c) <meta charset="utf-8"> (d) <link rel="stylesheet">
- 30.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <li> (c) <ol>
-
31.🔗 Which address opens when you click this link?
<a href="contact.html">Maths fun</a> (a) maths.html (b) Maths fun (c) https://example.com (d) contact.html - 32.🔍 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
- 33.True or false: a web browser turns HTML into a page. (a) False (b) True
- 34.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
- 35.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) alt (d) height
- 36.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 37.📄 Can HTML on its own make a form? (a) Yes (b) No
-
38.🔍 One closing tag is missing. Which one?
<em>Our school trip
<h3>Hello, world!</h3>
<h2>I love mangoes.</h2> (a) </h3> (b) </u> (c) </h2> (d) </em> -
39.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My best friend</p> -->
<p>Good morning!</p> -
40.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) About us (b) href (c) https://example.com (d) Contact us
Answer key
- a web server
- False
- height
- an opening tag
- Maths fun
- <h6>
- href
- line 3
- 1
- to leave notes
- 3
- has a closing tag
- -->
- <h2>
- 1
- 6
- line 2
- Fun facts
- <head>
- a closing tag
- Our school trip
- <li>
- Yes
- True
- 5
- <img>
- Language
- 1
- <table>
- <ol>
- contact.html
- hosts websites online
- True
- a web server
- width
- a closing tag
- Yes
- </em>
- 1
- About us
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids