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 <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
2.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red<br>Stars shine<br>Sky is blue<br>Kites fly high</p> - 3.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <br> (c) <hr> (d) <ul>
- 4.💬 Does the browser show comments on the page? (a) No (b) Yes
- 5.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <html> (d) <!DOCTYPE html>
- 6.True or false: <ol> is an unordered list. (a) True (b) False
-
7.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="400"> - 8.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
- 9.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
- 10.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
-
11.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Fun facts</p>
<p>I love mangoes.</p>
<!-- <p>The red kite</p> --> (a) The red kite (b) Fun facts (c) Rain today (d) I love mangoes. - 12.True or false: <b> has a closing tag. (a) False (b) True
- 13.Which of these is true of a web server? (a) is where we type code (b) saves our .html files (c) has an address bar (d) hosts websites online
- 14.🏷️ Which is the closing tag for <b>? (a) </b> (b) <\b> (c) <b/> (d) <b>
- 15.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to colour it (d) to make it bigger
- 16.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
17.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets - 18.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h2>? (a) <h6> (b) <h2> (c) <h1> (d) <h4>
- 19.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
-
20.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Banana</li>
<li>Grapes</li>
<li>Mango</li>
</ol> - 21.Which of these is an opening tag? (a) </h1> (b) </li> (c) </b> (d) <body>
- 22.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 23.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 24.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h5> or <h1>? (a) <h2> (b) <h1> (c) <h5> (d) <h6>
- 25.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 26.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) width (d) alt
- 27.Which of these is an opening tag? (a) </body> (b) <li> (c) </li> (d) </p>
- 28.True or false: in <img>, src describes the picture. (a) False (b) True
-
29.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<p>Fun facts</p> (a) Our school trip (b) Rain today (c) Fun facts - 30.📝 What do we need to write HTML? (a) a printer (b) a paintbrush (c) a microphone (d) a plain text editor
-
31.🔍 Which line is missing its closing tag?
line 1: <u>I love mangoes.</u>
line 2: <em>Rain today
line 3: <h2>Hello, world!</h2> (a) line 3 (b) line 2 (c) line 1 -
32.🔗 Which address opens when you click this link?
<a href="contact.html">Visit the site</a> (a) contact.html (b) Visit the site (c) maths.html (d) https://example.com -
33.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>The red kite</p>
<p>Fun facts</p> - 34.📄 Can HTML on its own make tables? (a) Yes (b) No
- 35.🌐 Which one is where we type code? (a) a code editor (b) a web server (c) a web browser
- 36.True or false: a web browser opens web pages for us. (a) True (b) False
-
37.🔗 Which words do you click on?
<a href="about.html">Play games</a> (a) Play games (b) href (c) About us (d) about.html - 38.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <ol> (d) <li>
-
39.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) body (b) Here is my best one. (c) All about me (d) Space Facts -
40.🔗 Which address opens when you click this link?
<a href="news.html">Maths fun</a> (a) quiz.html (b) Maths fun (c) news.html (d) games.html
Answer key
- an empty tag
- 5
- <ol>
- No
- <!DOCTYPE html>
- False
- 400
- <ul>
- <a>
- <!--
- The red kite
- True
- hosts websites online
- </b>
- to describe the image
- Yes
- bullets
- <h6>
- opens it in a new tab
- 4
- <body>
- a closing tag
- an opening tag
- <h6>
- an opening tag
- alt
- <li>
- False
- Our school trip
- a plain text editor
- line 2
- contact.html
- 1
- Yes
- a code editor
- True
- Play games
- <li>
- All about me
- news.html
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids