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.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) A tiger asleep (b) tiger.jpg (c) width (d) A red kite - 2.True or false: HTML on its own can make tables. (a) False (b) True
-
3.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<p>I love mangoes.</p>
<p>My best friend</p> (a) Hello, world! (b) I love mangoes. (c) My best friend (d) Rain today - 4.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
- 5.🔗 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
-
6.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>My best friend</p>
<h2>Hello, world!</h2> -
7.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Roses are red<br>Kites fly high<br>Rivers flow<br>Stars shine</p> -
8.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>The red kite</p>
<p>Rain today</p> (a) Our school trip (b) The red kite (c) Rain today -
9.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow</p> - 10.📄 Can HTML on its own pick a random number? (a) Yes (b) No
- 11.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
12.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Orange</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Mango</li>
<li>Banana</li>
</ol> -
13.🔗 Where does this link open?
<a href="art.html">Contact us</a> (a) in the same tab (b) in a new tab - 14.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) address (d) attribute
- 15.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <b> (d) <br>
- 16.🔍 Which is the odd one out? (a) is where we type code (b) colours code to help us (c) turns HTML into a page (d) shows line numbers
-
17.🔍 Which line is missing its closing tag?
line 1: <h3>Fun facts</h3>
line 2: <b>I love mangoes.</b>
line 3: <small>Good morning! (a) line 2 (b) line 1 (c) line 3 -
18.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Hello, world!</p>
<!-- <p>My best friend</p> --> (a) Hello, world! (b) Rain today (c) My best friend - 19.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
- 20.Which of these is an opening tag? (a) <b> (b) </h1> (c) </body> (d) </b>
- 21.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
-
22.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>Cricket is fun.</h2>
<p>Rain today</p>
<h2>Good morning!</h2>
<p>Cricket is fun.</p>
<p>Fun facts</p> - 23.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
24.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>My drawings</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) My Hobbies (b) body (c) My drawings (d) Thanks for visiting. - 25.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server
-
26.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>I love mangoes.</h2>
<p>Hello, world!</p>
<p>Rain today</p>
<p>I love mangoes.</p> -
27.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h4>I love mangoes.</h4>
<h2>I love mangoes.</h2>
<h2>My best friend</h2>
<h3>Cricket is fun.</h3> - 28.📄 Can HTML on its own keep a high score? (a) Yes (b) No
-
29.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) A happy dog (b) bus.jpg (c) dog.jpg (d) moon.png - 30.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 31.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h1>? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
-
32.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>I love mangoes.</p>
<p>My pets</p> - 33.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
- 34.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
-
35.🔍 Which line is missing its closing tag?
line 1: <strong>My best friend</strong>
line 2: <h3>Fun facts</h3>
line 3: <u>The red kite (a) line 2 (b) line 1 (c) line 3 -
36.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h3>Good morning!</h3>
<h4>The red kite</h4>
<h3>My pets</h3> - 37.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
-
38.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>My pets</p>
<p>My pets</p> -
39.🔗 Where does this link open?
<a href="art.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab - 40.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) </h1> (c) <h1> (d) <h1/>
Answer key
- A tiger asleep
- True
- Hello, world!
- alt
- opens it in a new tab
- 2
- 5
- Our school trip
- 2
- No
- has a closing tag
- 6
- in the same tab
- element
- <b>
- turns HTML into a page
- line 3
- My best friend
- href
- <b>
- the body
- 4
- Yes
- My drawings
- a web browser
- 4
- 5
- No
- dog.jpg
- Yes
- <h6>
- 1
- <
- No
- line 3
- 4
- <!DOCTYPE html>
- 3
- in a new tab
- </h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids