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.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 2.Which of these goes in the head? (a) <h1> (b) <link rel="stylesheet"> (c) <img> (d) <a>
- 3.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
- 4.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h3>? (a) <h4> (b) <h3> (c) <h5> (d) <h6>
-
5.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>My best friend</p>
<p>Rain today</p> - 6.Which of these is a closing tag? (a) <p> (b) <h1> (c) </h1> (d) <li>
-
7.🔗 Where does this link open?
<a href="about.html" target="_blank">School news</a> (a) in a new tab (b) in the same tab -
8.📋 What number does the browser show next to “Banana”?
<ol>
<li>Litchi</li>
<li>Grapes</li>
<li>Orange</li>
<li>Banana</li>
</ol> - 9.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <head> (c) <!DOCTYPE html> (d) </head>
- 10.🌐 Which one sends pages over the net? (a) a web server (b) a code editor (c) a web browser
- 11.True or false: <li> is one item of a list. (a) True (b) False
- 12.True or false: HTML on its own cannot make links to pages. (a) True (b) False
- 13.🏷️ Which is the closing tag for <u>? (a) <u> (b) <u/> (c) </u> (d) <\u>
-
14.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Good morning!</p>
<h2>Our school trip</h2>
<h2>Hello, world!</h2>
<p>The red kite</p> - 15.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) an attribute (d) a comment
- 16.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Machine (c) Markup (d) Modern
-
17.📋 Does this list show bullets or numbers?
<ol>
<li>Litchi</li>
<li>Papaya</li>
<li>Mango</li>
</ol> (a) numbers (b) bullets - 18.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <hr> (d) <br>
-
19.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>I love mangoes.</p>
<p>Rain today</p> -
20.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine</p> - 21.True or false: a web server has an address bar. (a) False (b) True
- 22.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
- 23.🔤 In “HTML”, what does the L stand for? (a) Language (b) Line (c) Laptop (d) Link
-
24.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>Good morning!</h3>
<h4>My best friend</h4> - 25.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
- 26.📄 Can HTML on its own keep a high score? (a) No (b) Yes
- 27.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
- 28.True or false: a code editor saves our .html files. (a) True (b) False
- 29.Which of these is true of a web server? (a) is where we type code (b) opens web pages for us (c) stores a website’s files (d) saves our .html files
- 30.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
-
31.🔗 Which address opens when you click this link?
<a href="https://example.com">Maths fun</a> (a) maths.html (b) https://example.com (c) Maths fun (d) art.html -
32.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Fun facts</p>
<p>Hello, world!</p> (a) Hello, world! (b) Good morning! (c) Fun facts - 33.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) opens web pages for us (d) saves our .html files
- 34.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 35.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 36.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h3>? (a) <h5> (b) <h1> (c) <h4> (d) <h3>
- 37.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) shows line numbers (d) turns HTML into a page
- 38.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h1>? (a) <h3> (b) <h6> (c) <h1> (d) <h2>
-
39.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Good morning!</p>
<p>Fun facts</p>
<p>Hello, world!</p> - 40.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h4>? (a) <h3> (b) <h1> (c) <h2> (d) <h4>
Answer key
- No
- <link rel="stylesheet">
- alt
- <h3>
- 1
- </h1>
- in a new tab
- 4
- </html>
- a web server
- True
- False
- </u>
- 3
- an attribute
- Markup
- numbers
- <ol>
- 1
- 2
- False
- src
- Language
- 3
- <!DOCTYPE html>
- No
- the body
- True
- stores a website’s files
- in the body
- https://example.com
- Good morning!
- saves our .html files
- a closing tag
- in the body
- <h1>
- turns HTML into a page
- <h1>
- 3
- <h4>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids