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.True or false: in <img>, src describes the picture. (a) True (b) False
-
2.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Hello, world!</p>
<p>My pets</p> - 3.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
4.🔗 Where does this link open?
<a href="contact.html">Art corner</a> (a) in the same tab (b) in a new tab - 5.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h4> (d) <h1>
- 6.🔢 In a basic web page file, which comes first: “<body>” or “</body>”? (a) </body> (b) <body>
- 7.Which of these is true of a code editor? (a) sends pages over the net (b) saves our .html files (c) shows pages from the web (d) has an address bar
-
8.🔗 Which words do you click on?
<a href="quiz.html">About us</a> (a) Contact us (b) About us (c) href (d) quiz.html - 9.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 10.True or false: in <img>, width describes the picture. (a) True (b) False
-
11.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Stars shine</p> - 12.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h6>? (a) <h1> (b) <h5> (c) <h6> (d) <h3>
- 13.Which of these is true of a web browser? (a) stores a website’s files (b) turns HTML into a page (c) answers page requests (d) saves our .html files
- 14.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <head> (c) <html> (d) <body>
-
15.🔗 Where does this link open?
<a href="games.html">Contact us</a> (a) in a new tab (b) in the same tab -
16.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h3>My best friend</h3>
<h3>I love mangoes.</h3>
<h3>I love mangoes.</h3>
<p>Hello, world!</p> - 17.Which of these is a closing tag? (a) </b> (b) <b> (c) <title> (d) <h1>
-
18.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Rain today</p>
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<p>Fun facts</p> -
19.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h4>Good morning!</h4>
<p>Our school trip</p> -
20.🔗 Where does this link open?
<a href="games.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab - 21.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
- 22.True or false: in <img>, width shows if the image fails. (a) True (b) False
- 23.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) src (c) alt (d) width
- 24.Which of these is an empty tag? (a) <title> (b) <h1> (c) <p> (d) <br>
- 25.🔢 In a basic web page file, which comes first: “<html>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) <html>
- 26.Which of these is an opening tag? (a) <title> (b) </h1> (c) </li> (d) </title>
- 27.True or false: HTML on its own cannot keep a high score. (a) True (b) False
- 28.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
- 29.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h5>? (a) <h4> (b) <h6> (c) <h3> (d) <h5>
- 30.True or false: <ol> is an ordered list. (a) True (b) False
- 31.Which of these is true of a web server? (a) shows pages from the web (b) is where we type code (c) hosts websites online (d) opens web pages for us
- 32.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 33.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
-
34.🔗 Which words do you click on?
<a href="maths.html">Art corner</a> (a) School news (b) Art corner (c) href (d) maths.html - 35.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <h6> (d) <p>
- 36.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) </h1> (c) <h1> (d) <h1/>
- 37.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
-
38.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) https://example.com (b) maths.html (c) Contact us (d) contact.html - 39.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
40.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets
Answer key
- False
- 1
- Yes
- in the same tab
- <h6>
- <body>
- saves our .html files
- About us
- No
- False
- 2
- <h6>
- turns HTML into a page
- <!DOCTYPE html>
- in the same tab
- 4
- </b>
- 4
- 2
- in a new tab
- alt
- False
- height
- <br>
- <!DOCTYPE html>
- <title>
- True
- opens it in a new tab
- <h6>
- True
- hosts websites online
- in the head
- a code editor
- Art corner
- <h6>
- </h1>
- a web browser
- contact.html
- an opening tag
- bullets
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids