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: a web server has an address bar. (a) False (b) True
- 2.True or false: <table> goes in the head. (a) True (b) False
- 3.True or false: <li> shows bullet points. (a) True (b) False
- 4.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) nowhere (d) in a big heading
-
5.🔍 One closing tag is missing. Which one?
<i>Our school trip
<h1>Good morning!</h1>
<b>My best friend</b> (a) </b> (b) </h1> (c) </i> (d) </h3> - 6.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
-
7.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>The red kite</p> -->
<p>Rain today</p> - 8.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <link rel="stylesheet"> (d) <ul>
-
9.🔍 One closing tag is missing. Which one?
<h3>Our school trip</h3>
<p>Good morning!</p>
<h1>My best friend (a) </h3> (b) </small> (c) </h1> (d) </p> - 10.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
-
11.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) Space Facts (b) index.html (c) Welcome! (d) I like to read. -
12.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h2>Our school trip</h2>
<h3>Fun facts</h3> - 13.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 14.Which of these is true of a web browser? (a) shows pages from the web (b) hosts websites online (c) is where we type code (d) stores a website’s files
- 15.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
-
16.🔍 Which line is missing its closing tag?
line 1: <small>The red kite</small>
line 2: <i>I love mangoes.</i>
line 3: <h2>Hello, world! (a) line 1 (b) line 3 (c) line 2 - 17.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
- 18.Which of these goes in the body? (a) <h1> (b) <title> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
-
19.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Rivers flow<br>Sky is blue<br>Roses are red</p> -
20.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Hello, world!</p>
<p>My best friend</p>
<p>The red kite</p> - 21.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i> (c) </i> (d) <i/>
-
22.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Grapes</li>
</ol> - 23.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) alt (d) width
- 24.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
- 25.True or false: a web browser shows pages from the web. (a) False (b) True
-
26.🔗 Which address opens when you click this link?
<a href="https://example.com">About us</a> (a) maths.html (b) art.html (c) About us (d) https://example.com - 27.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) { (d) <
- 28.💾 A web page file usually ends with which extension? (a) .png (b) .html (c) .mp3 (d) .txt
- 29.True or false: HTML on its own can make bullet lists. (a) False (b) True
-
30.🔗 Where does this link open?
<a href="games.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab - 31.True or false: <hr> has a closing tag. (a) False (b) True
-
32.🔗 Which words do you click on?
<a href="news.html">About us</a> (a) About us (b) href (c) Contact us (d) news.html - 33.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) stores a website’s files (d) shows line numbers
-
34.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Jamun</li>
<li>Grapes</li>
<li>Mango</li>
</ol> - 35.Which of these is true of a code editor? (a) saves our .html files (b) opens web pages for us (c) shows pages from the web (d) hosts websites online
-
36.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) contact.html (b) About us (c) href (d) Play games -
37.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Our school trip</p>
<p>My pets</p>
<p>Rain today</p> (a) Rain today (b) Our school trip (c) My pets (d) The red kite -
38.📋 What number does the browser show next to “Litchi”?
<ol start="5">
<li>Guava</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> -
39.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab - 40.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
Answer key
- False
- False
- False
- on the browser tab
- </i>
- opens it in a new tab
- 1
- <ul>
- </h1>
- <a>
- Space Facts
- 3
- Yes
- shows pages from the web
- <ul>
- line 3
- to leave notes
- <h1>
- 4
- 1
- </i>
- 2
- alt
- a code editor
- True
- https://example.com
- <
- .html
- True
- in a new tab
- False
- About us
- stores a website’s files
- 2
- saves our .html files
- Play games
- The red kite
- 6
- in a new tab
- a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids