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 text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Our school trip</p> -->
<p>The red kite</p>
<p>My best friend</p> (a) The red kite (b) Hello, world! (c) My best friend (d) Our school trip -
2.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> --> - 3.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
-
4.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<p>Good morning!</p> (a) Our school trip (b) Good morning! (c) The red kite -
5.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) index.html (b) We won by 5 runs. (c) Welcome! (d) Space Facts -
6.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Fun facts</p>
<p>Fun facts</p>
<p>Rain today</p> - 7.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) High Tech (c) Home Text (d) Hot Tags
- 8.True or false: <ol> is an ordered list. (a) True (b) False
- 9.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) alt (d) height
-
10.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Mango</li>
<li>Orange</li>
</ul> - 11.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Machine (c) Modern (d) Markup
- 12.💬 How does an HTML comment end? (a) >> (b) */ (c) --> (d) //
-
13.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Our school trip</p>
<p>Hello, world!</p>
<p>Our school trip</p>
<h2>Our school trip</h2> -
14.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="100"> (a) width (b) fort.jpg (c) A tiger asleep (d) An old fort - 15.Which of these is true of a web server? (a) has an address bar (b) saves our .html files (c) stores a website’s files (d) shows line numbers
- 16.True or false: <table> goes in the body. (a) False (b) True
-
17.📋 Does this list show bullets or numbers?
<ol>
<li>Litchi</li>
<li>Grapes</li>
<li>Jamun</li>
</ol> (a) bullets (b) numbers - 18.True or false: HTML on its own can keep a high score. (a) False (b) True
- 19.💬 Does the browser show comments on the page? (a) Yes (b) No
- 20.True or false: HTML on its own can run a game loop. (a) True (b) False
- 21.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the doctype (d) the body
- 22.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 23.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 24.True or false: HTML on its own cannot make links to pages. (a) False (b) True
- 25.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
- 26.📝 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
-
27.🔍 One closing tag is missing. Which one?
<h2>Cricket is fun.
<strong>Fun facts</strong>
<b>Rain today</b> (a) </h2> (b) </u> (c) </b> (d) </strong> - 28.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
29.🔍 One closing tag is missing. Which one?
<b>The red kite</b>
<strong>My best friend</strong>
<i>My pets (a) </u> (b) </b> (c) </strong> (d) </i> -
30.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Litchi</li>
</ul> (a) bullets (b) numbers - 31.Which of these is an opening tag? (a) </body> (b) </b> (c) <body> (d) </h1>
-
32.🔗 Which address opens when you click this link?
<a href="games.html">Contact us</a> (a) Contact us (b) about.html (c) contact.html (d) games.html -
33.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) href (b) Visit the site (c) Maths fun (d) news.html - 34.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) element (d) address
- 35.True or false: HTML on its own can make bullet lists. (a) False (b) True
- 36.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
- 37.Which of these goes in the head? (a) <ul> (b) <table> (c) <p> (d) <style>
- 38.True or false: HTML on its own can add up two numbers. (a) False (b) True
-
39.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Orange</li>
<li>Banana</li>
<li>Guava</li>
<li>Jamun</li>
</ol> - 40.True or false: <h1> is an empty tag. (a) True (b) False
Answer key
- Our school trip
- 3
- <!--
- Our school trip
- Space Facts
- 1
- HyperText
- True
- alt
- 3
- Markup
- -->
- 4
- An old fort
- stores a website’s files
- True
- numbers
- False
- No
- False
- the body
- a closing tag
- an opening tag
- False
- False
- as one space
- </h2>
- has a closing tag
- </i>
- bullets
- <body>
- games.html
- Visit the site
- element
- True
- to describe the image
- <style>
- False
- 5
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids