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 attribute holds the address of a link? (a) id (b) href (c) alt (d) src
- 2.📝 What does <br> do? (a) makes a list (b) adds a picture (c) makes text bold (d) starts a new line
- 3.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
- 4.True or false: in <img>, src describes the picture. (a) True (b) False
- 5.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
- 6.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
- 7.🔗 What does HyperText mean? (a) secret text (b) text in colour (c) very big text (d) text with links
-
8.🔗 Which address opens when you click this link?
<a href="news.html">School news</a> (a) School news (b) games.html (c) news.html (d) quiz.html - 9.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 10.🏷️ Which is the closing tag for <p>? (a) </p> (b) <p> (c) <p/> (d) <\p>
- 11.True or false: a code editor shows pages from the web. (a) False (b) True
-
12.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> --> (a) Cricket is fun. (b) Rain today (c) Good morning! -
13.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Grapes</li>
<li>Orange</li>
</ul> (a) bullets (b) numbers - 14.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
15.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) href (b) About us (c) https://example.com (d) Play games -
16.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Cricket is fun.</p>
<p>Fun facts</p> - 17.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as a dot (d) as one space
- 18.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h4>
- 19.🔍 Which is the odd one out? (a) colours code to help us (b) saves our .html files (c) opens web pages for us (d) is where we type code
- 20.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) { (d) <
- 21.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) </h3> (c) <\h3> (d) <h3/>
-
22.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="200"> - 23.True or false: <ol> lists steps in order. (a) True (b) False
- 24.🔍 Which is the odd one out? (a) opens web pages for us (b) colours code to help us (c) shows pages from the web (d) has an address bar
- 25.🧱 HTML gives a web page its ___. (a) structure (b) speed (c) colours (d) sound
- 26.Which of these is true of a web server? (a) has an address bar (b) is where we type code (c) turns HTML into a page (d) sends pages over the net
-
27.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Rain today (c) My best friend - 28.📋 Which list tag is an ordered list? (a) <ul> (b) <ol> (c) <li>
-
29.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) index.html (b) Here is my best one. (c) Art Gallery (d) All about me - 30.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 6 (d) 4
-
31.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>Rain today</h3>
<p>Fun facts</p>
<h4>Our school trip</h4>
<p>The red kite</p> - 32.💬 How does an HTML comment end? (a) >> (b) --> (c) // (d) */
- 33.True or false: <style> goes in the body. (a) True (b) False
- 34.True or false: in <img>, src names the picture file. (a) False (b) True
-
35.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="300"> (a) kite.png (b) fort.jpg (c) An old fort (d) tiger.jpg -
36.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Fun facts</p>
<p>The red kite</p> -
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="200"> (a) bus.jpg (b) Our school bus (c) An old fort (d) width -
38.🔗 Which address opens when you click this link?
<a href="news.html">About us</a> (a) About us (b) quiz.html (c) games.html (d) news.html - 39.Which of these is an opening tag? (a) </li> (b) </title> (c) <li> (d) </b>
- 40.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 10 (d) 6
Answer key
- href
- starts a new line
- <li>
- False
- a web server
- element
- text with links
- news.html
- Yes
- </p>
- False
- Cricket is fun.
- bullets
- a closing tag
- Play games
- 1
- as one space
- <h5>
- opens web pages for us
- <
- </h3>
- 200
- True
- colours code to help us
- structure
- sends pages over the net
- My best friend
- <ol>
- Art Gallery
- 6
- 3
- -->
- False
- True
- fort.jpg
- 1
- Our school bus
- news.html
- <li>
- 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids