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 part holds everything you see on the page? (a) the head (b) the body (c) the title (d) the doctype
- 2.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
-
3.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>The red kite</p>
<p>My pets</p>
<h4>Good morning!</h4>
<p>Good morning!</p> -
4.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red<br>Kites fly high</p> -
5.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p>
<p>The red kite</p> (a) Cricket is fun. (b) The red kite (c) I love mangoes. - 6.💬 How does an HTML comment start? (a) // (b) # (c) <!-- (d) /*
-
7.🔗 Which address opens when you click this link?
<a href="art.html">Visit the site</a> (a) quiz.html (b) Visit the site (c) news.html (d) art.html - 8.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
-
9.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Our school trip</p>
<p>Good morning!</p>
<p>My pets</p> -
10.🔗 Where does this link open?
<a href="maths.html">Contact us</a> (a) in a new tab (b) in the same tab - 11.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <ul> (d) <li>
- 12.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a dot . (d) a hash #
- 13.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) has an address bar (d) hosts websites online
-
14.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) I like to read. (c) Art Gallery (d) Planets -
15.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Rain today</p>
<!-- <p>The red kite</p> --> - 16.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Language (c) Line (d) Link
-
17.🔗 Which words do you click on?
<a href="news.html">School news</a> (a) Take the quiz (b) School news (c) news.html (d) href -
18.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>My best friend</p>
<h2>My best friend</h2>
<h2>Fun facts</h2>
<p>The red kite</p>
<h2>Fun facts</h2> -
19.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h3>I love mangoes.</h3>
<h4>Good morning!</h4> -
20.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Fun facts</p>
<p>My best friend</p>
<p>My pets</p> - 21.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) height (c) src (d) width
- 22.Which of these is an opening tag? (a) </title> (b) </h1> (c) <li> (d) </p>
- 23.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 3 (d) 1
-
24.🔗 Where does this link open?
<a href="about.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab - 25.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
-
26.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Our school trip</p>
<p>The red kite</p> (a) The red kite (b) Our school trip (c) Good morning! - 27.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) alt (d) src
- 28.True or false: a web browser opens web pages for us. (a) False (b) True
- 29.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
-
30.🔍 Which line is missing its closing tag?
line 1: <u>Rain today</u>
line 2: <i>Our school trip
line 3: <h3>Hello, world!</h3> (a) line 1 (b) line 3 (c) line 2 - 31.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 32.📄 Can HTML on its own pick a random number? (a) No (b) Yes
- 33.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as one space (d) as a new line
- 34.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h4> (b) <h2> (c) <h3> (d) <h1>
-
35.🔗 Which address opens when you click this link?
<a href="maths.html">Contact us</a> (a) maths.html (b) news.html (c) art.html (d) Contact us -
36.🔗 Where does this link open?
<a href="maths.html">Play games</a> (a) in a new tab (b) in the same tab - 37.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 6 (d) 4
- 38.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h1> or <h5>? (a) <h1> (b) <h4> (c) <h3> (d) <h5>
- 39.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h2> or <h5>? (a) <h2> (b) <h4> (c) <h5> (d) <h3>
- 40.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) nowhere (d) in a big heading
Answer key
- the body
- <a>
- 2
- 3
- I love mangoes.
- <!--
- art.html
- <!DOCTYPE html>
- 4
- in the same tab
- <li>
- a slash /
- hosts websites online
- Art Gallery
- 1
- Language
- School news
- 3
- 3
- 4
- alt
- <li>
- 1
- in a new tab
- False
- Good morning!
- src
- True
- to leave notes
- line 2
- a closing tag
- No
- as one space
- <h1>
- maths.html
- in the same tab
- 6
- <h5>
- <h5>
- on the browser tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids