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 tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
- 2.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
- 3.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h5>? (a) <h3> (b) <h2> (c) <h5> (d) <h1>
- 4.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
- 5.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
-
6.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) Space Facts (c) body (d) My drawings -
7.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue<br>Roses are red<br>Birds sing</p> -
8.📋 What number does the browser show next to “Grapes”?
<ol start="9">
<li>Mango</li>
<li>Grapes</li>
<li>Banana</li>
<li>Jamun</li>
</ol> - 9.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <html> (c) </body> (d) <!DOCTYPE html>
-
10.🔍 Which line is missing its closing tag?
line 1: <i>The red kite</i>
line 2: <h3>Good morning!</h3>
line 3: <h2>Cricket is fun. (a) line 3 (b) line 2 (c) line 1 - 11.Which of these is true of a web browser? (a) sends pages over the net (b) stores a website’s files (c) opens web pages for us (d) shows line numbers
-
12.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="100"> (a) moon.png (b) dog.jpg (c) cake.jpg (d) Birthday cake - 13.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) stores a website’s files (d) shows pages from the web
- 14.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) at the bottom (d) in a big heading
- 15.🔍 Which is the odd one out? (a) turns HTML into a page (b) hosts websites online (c) sends pages over the net (d) answers page requests
- 16.True or false: HTML on its own cannot make links to pages. (a) False (b) True
- 17.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
18.📋 What number does the browser show next to “Mango”?
<ol start="9">
<li>Jamun</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Grapes</li>
<li>Orange</li>
<li>Mango</li>
</ol> -
19.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>The red kite</p> -->
<p>Hello, world!</p> - 20.Which of these has a closing tag? (a) <input> (b) <h1> (c) <img> (d) <hr>
- 21.True or false: HTML on its own cannot count button clicks. (a) False (b) True
- 22.🏷️ Which is the closing tag for <em>? (a) <\em> (b) </em> (c) <em/> (d) <em>
- 23.True or false: in <img>, width tells which image to load. (a) True (b) False
-
24.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow</p> -
25.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>My pets</p>
<h2>My pets</h2>
<p>Cricket is fun.</p> - 26.True or false: <b> has a closing tag. (a) True (b) False
- 27.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) ( (d) <
- 28.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
- 29.🔍 Which is the odd one out? (a) stores a website’s files (b) shows line numbers (c) colours code to help us (d) is where we type code
- 30.🏷️ Which is the closing tag for <i>? (a) <i/> (b) <\i> (c) <i> (d) </i>
-
31.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>My best friend</p>
<!-- <p>Fun facts</p> -->
<!-- <p>My pets</p> -->
<!-- <p>Our school trip</p> --> - 32.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <ol> (d) <hr>
-
33.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Our school trip</h2>
<p>Fun facts</p>
<p>Good morning!</p>
<h2>My pets</h2> - 34.True or false: <br> has a closing tag. (a) True (b) False
-
35.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>Cricket is fun.</h2>
<p>Fun facts</p>
<p>My best friend</p>
<p>Good morning!</p> - 36.True or false: <a> goes in the head. (a) True (b) False
-
37.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Rain today</p>
<p>Hello, world!</p>
<h2>Good morning!</h2>
<p>Hello, world!</p> - 38.🌐 Which one opens web pages for us? (a) a code editor (b) a web browser (c) a web server
- 39.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) height (d) width
- 40.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) colours code to help us (d) has an address bar
Answer key
- <a>
- <!DOCTYPE html>
- <h1>
- opens it in a new tab
- the body
- My drawings
- 4
- 10
- <!DOCTYPE html>
- line 3
- opens web pages for us
- cake.jpg
- shows pages from the web
- on the browser tab
- turns HTML into a page
- False
- has a closing tag
- 14
- 3
- <h1>
- True
- </em>
- False
- 2
- 3
- True
- <
- a slash /
- stores a website’s files
- </i>
- 2
- <ul>
- 3
- False
- 2
- False
- 2
- a web browser
- width
- has an address bar
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids