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 list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
-
2.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Rain today</p>
<!-- <p>Our school trip</p> --> (a) Rain today (b) I love mangoes. (c) Our school trip - 3.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
- 4.True or false: HTML on its own can make bullet lists. (a) True (b) False
-
5.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Fun facts</p> -->
<p>Our school trip</p>
<p>Good morning!</p>
<p>Cricket is fun.</p> - 6.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h4>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
-
7.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Orange</li>
</ol> (a) bullets (b) numbers - 8.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 9.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
10.🔗 Which address opens when you click this link?
<a href="news.html">Art corner</a> (a) Art corner (b) quiz.html (c) news.html (d) games.html - 11.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
- 12.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) makes it blank (d) hides the link
-
13.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Mango</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Banana</li>
</ol> -
14.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Guava</li>
<li>Papaya</li>
<li>Orange</li>
</ol> -
15.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) Play games (b) about.html (c) Take the quiz (d) href - 16.Which of these is true of a web server? (a) shows pages from the web (b) colours code to help us (c) answers page requests (d) has an address bar
- 17.True or false: a code editor shows pages from the web. (a) True (b) False
-
18.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="100"> (a) fort.jpg (b) bus.jpg (c) moon.png (d) The full moon - 19.True or false: <title> is an empty tag. (a) True (b) False
- 20.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
21.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>Our school trip</p>
<!-- <p>The red kite</p> --> (a) Hello, world! (b) The red kite (c) Our school trip -
22.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) Space Facts (c) Match report (d) body -
23.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Rain today</p>
<h3>My best friend</h3>
<h4>I love mangoes.</h4>
<p>I love mangoes.</p> -
24.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow<br>Stars shine</p> -
25.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Our school trip</p>
<p>Our school trip</p> - 26.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) address (d) element
-
27.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Hello, world!</p>
<p>Hello, world!</p> - 28.📄 Can HTML on its own make links to pages? (a) Yes (b) No
-
29.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="250"> - 30.📝 What does <p> make? (a) a picture (b) a link (c) a paragraph (d) a table
-
31.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>My best friend</p>
<!-- <p>Good morning!</p> --> (a) My best friend (b) Good morning! (c) Our school trip - 32.🏷️ Which is the closing tag for <p>? (a) <p> (b) <\p> (c) <p/> (d) </p>
- 33.True or false: HTML on its own can add pictures to a page. (a) True (b) False
-
34.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets - 35.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
-
36.🔗 Where does this link open?
<a href="maths.html">Play games</a> (a) in the same tab (b) in a new tab - 37.True or false: <p> has a closing tag. (a) False (b) True
- 38.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
- 39.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h1>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
- 40.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
Answer key
- <ul>
- Our school trip
- Yes
- True
- 3
- <h4>
- numbers
- in the head
- a closing tag
- news.html
- href
- opens it in a new tab
- 2
- 2
- Take the quiz
- answers page requests
- False
- moon.png
- False
- Yes
- The red kite
- Match report
- 3
- 3
- 1
- element
- 1
- Yes
- 250
- a paragraph
- Good morning!
- </p>
- True
- bullets
- a code editor
- in the same tab
- True
- to describe the image
- <h6>
- to leave notes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids