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.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> -->
<p>Fun facts</p>
<p>Hello, world!</p> - 2.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 3.Which of these is true of a code editor? (a) sends pages over the net (b) answers page requests (c) is where we type code (d) has an address bar
- 4.True or false: HTML on its own can keep a high score. (a) True (b) False
-
5.🔍 One closing tag is missing. Which one?
<b>I love mangoes.
<p>My pets</p>
<em>Rain today</em> (a) </b> (b) </p> (c) </strong> (d) </em> - 6.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) alt (d) height
-
7.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>The red kite</p> -->
<!-- <p>Hello, world!</p> --> - 8.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) </strong> (c) <strong> (d) <\strong>
-
9.🔗 Which words do you click on?
<a href="maths.html">Play games</a> (a) maths.html (b) href (c) About us (d) Play games - 10.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 11.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
- 12.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
- 13.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as a new line (d) as one space
- 14.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
- 15.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 16.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) starts a new line (d) makes a list
- 17.📋 Which list tag is one item of a list? (a) <ol> (b) <ul> (c) <li>
-
18.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Mars is red.</p>
</body>
</html> (a) index.html (b) Mars is red. (c) Easy snacks (d) Space Facts -
19.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) map.png (b) tiger.jpg (c) A tiger asleep (d) kite.png -
20.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine<br>Roses are red<br>Rivers flow</p> - 21.🏷️ Which is the closing tag for <i>? (a) <\i> (b) </i> (c) <i/> (d) <i>
-
22.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) Art Gallery (c) body (d) All about me - 23.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 24.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <img> (d) <p>
- 25.💬 Does the browser show comments on the page? (a) No (b) Yes
- 26.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
- 27.💬 How does an HTML comment end? (a) // (b) >> (c) */ (d) -->
-
28.🔍 One closing tag is missing. Which one?
<p>Fun facts
<em>Rain today</em>
<u>Hello, world!</u> (a) </em> (b) </p> (c) </u> (d) </b> -
29.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) Welcome! (b) My Hobbies (c) I like to read. (d) index.html -
30.🔗 Where does this link open?
<a href="maths.html">School news</a> (a) in a new tab (b) in the same tab - 31.True or false: <li> shows bullet points. (a) False (b) True
- 32.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h4>? (a) <h3> (b) <h2> (c) <h4> (d) <h1>
- 33.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <ul> (d) <li>
-
34.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Kites fly high<br>Birds sing<br>Rivers flow<br>Sky is blue</p> - 35.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 36.True or false: HTML on its own can run a game loop. (a) False (b) True
- 37.Which of these is true of a code editor? (a) opens web pages for us (b) stores a website’s files (c) shows pages from the web (d) saves our .html files
-
38.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Papaya</li>
<li>Orange</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Litchi</li>
</ul> - 39.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 40.Which of these is true of a web browser? (a) shows pages from the web (b) is where we type code (c) sends pages over the net (d) answers page requests
Answer key
- 3
- <ul>
- is where we type code
- False
- </b>
- alt
- 1
- </strong>
- Play games
- has a closing tag
- in the body
- <
- as one space
- True
- an opening tag
- starts a new line
- <li>
- Space Facts
- tiger.jpg
- 4
- </i>
- All about me
- Yes
- <a>
- No
- False
- -->
- </p>
- My Hobbies
- in the same tab
- False
- <h4>
- <li>
- 5
- a closing tag
- False
- saves our .html files
- 6
- in the body
- shows pages from the web
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids