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 program shows a web page to us? (a) a paint program (b) a web browser (c) a music player (d) a calculator
- 2.📝 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 a new line (d) as one space
- 3.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
-
4.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Stars shine<br>Kites fly high</p> - 5.True or false: HTML on its own cannot make headings. (a) True (b) False
- 6.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
7.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Fun facts</p>
<h4>My pets</h4> -
8.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="50"> (a) map.png (b) A red kite (c) cake.jpg (d) kite.png - 9.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) shows line numbers (d) opens web pages for us
- 10.📄 Can HTML on its own make links to pages? (a) No (b) Yes
-
11.🔍 One closing tag is missing. Which one?
<i>Cricket is fun.</i>
<em>Fun facts</em>
<small>Our school trip (a) </small> (b) </i> (c) </em> (d) </h1> -
12.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Hello, world!</p>
<p>The red kite</p>
<p>I love mangoes.</p>
<p>Fun facts</p> -
13.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) index.html (b) We won by 5 runs. (c) Cricket Club (d) Planets -
14.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>My best friend</p>
<!-- <p>Rain today</p> --> (a) My best friend (b) Rain today (c) Hello, world! -
15.🔗 Where does this link open?
<a href="news.html">Contact us</a> (a) in the same tab (b) in a new tab - 16.Which of these is an opening tag? (a) </b> (b) </p> (c) <p> (d) </h1>
-
17.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Rain today</p> -->
<p>My best friend</p> (a) Rain today (b) Hello, world! (c) My best friend -
18.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Rain today</p>
<p>I love mangoes.</p>
<p>I love mangoes.</p>
<p>My best friend</p>
<h2>The red kite</h2> - 19.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 20.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <img> (d) <li>
-
21.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="200"> - 22.Which of these goes in the head? (a) <table> (b) <title> (c) <img> (d) <a>
-
23.🔍 One closing tag is missing. Which one?
<small>Good morning!
<h3>Hello, world!</h3>
<h2>I love mangoes.</h2> (a) </h2> (b) </small> (c) </strong> (d) </h3> -
24.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> --> - 25.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h5>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
- 26.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
27.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) cake.jpg (b) width (c) A happy dog (d) Birthday cake -
28.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<p>Fun facts</p> (a) The red kite (b) I love mangoes. (c) Fun facts (d) Our school trip -
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="150"> (a) An old fort (b) bus.jpg (c) width (d) Our school bus - 30.True or false: HTML on its own cannot keep a high score. (a) True (b) False
-
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="200"> (a) A happy dog (b) dog.jpg (c) The full moon (d) width - 32.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 33.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
- 34.True or false: in <img>, height sets how tall it is. (a) False (b) True
- 35.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
- 36.🌐 Which one saves our .html files? (a) a web browser (b) a code editor (c) a web server
- 37.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) hosts websites online (d) shows pages from the web
- 38.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
- 39.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
- 40.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
Answer key
- a web browser
- as one space
- <a href="about.html">
- 4
- False
- has a closing tag
- 2
- kite.png
- shows line numbers
- Yes
- </small>
- 5
- Cricket Club
- Rain today
- in the same tab
- <p>
- Rain today
- 5
- an opening tag
- <li>
- 200
- <title>
- </small>
- 1
- <h1>
- Yes
- Birthday cake
- Our school trip
- Our school bus
- True
- A happy dog
- in the body
- opens it in a new tab
- True
- <ul>
- a code editor
- shows pages from the web
- an attribute
- to describe the image
- an opening tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids