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 of these is true of a web server? (a) opens web pages for us (b) shows line numbers (c) shows pages from the web (d) sends pages over the net
- 2.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <ol> (d) <br>
-
3.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab -
4.🔍 One closing tag is missing. Which one?
<h3>My best friend
<i>Cricket is fun.</i>
<em>Good morning!</em> (a) </i> (b) </em> (c) </h3> (d) </b> - 5.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) element (d) address
-
6.🔍 Which line is missing its closing tag?
line 1: <p>I love mangoes.</p>
line 2: <small>My pets</small>
line 3: <h2>Cricket is fun. (a) line 3 (b) line 2 (c) line 1 - 7.Which of these is true of a code editor? (a) answers page requests (b) hosts websites online (c) shows pages from the web (d) shows line numbers
-
8.🔍 Which line is missing its closing tag?
line 1: <h1>The red kite</h1>
line 2: <h3>Hello, world!</h3>
line 3: <strong>Fun facts (a) line 3 (b) line 2 (c) line 1 -
9.🔍 Which line is missing its closing tag?
line 1: <small>My best friend</small>
line 2: <h3>The red kite</h3>
line 3: <p>Cricket is fun. (a) line 2 (b) line 3 (c) line 1 - 10.True or false: a web server sends pages over the net. (a) False (b) True
-
11.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="400"> - 12.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
- 13.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
- 14.📄 Can HTML on its own make a form? (a) No (b) Yes
- 15.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
- 16.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) </h2> (d) <h2/>
-
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) cake.jpg (b) width (c) Birthday cake (d) A happy dog -
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="200"> (a) Map of India (b) width (c) A red kite (d) kite.png - 19.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h4> or <h1>? (a) <h2> (b) <h5> (c) <h4> (d) <h1>
-
20.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>My best friend</h2>
<h2>I love mangoes.</h2> - 21.📛 In <a href="x.html">, what is href? (a) a comment (b) an attribute (c) an element name (d) a closing tag
- 22.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
- 23.Which of these is true of a web browser? (a) colours code to help us (b) is where we type code (c) turns HTML into a page (d) shows line numbers
- 24.True or false: a web server shows pages from the web. (a) False (b) True
-
25.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) My Hobbies (b) All about me (c) index.html (d) Here is my best one. - 26.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 27.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
-
28.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p>
<p>Fun facts</p>
<p>My pets</p> -
29.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Good morning!</p>
<p>The red kite</p> -
30.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="200"> - 31.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
- 32.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
- 33.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
34.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Hello, world!</p> -->
<p>The red kite</p> -
35.🔗 Which address opens when you click this link?
<a href="games.html">Art corner</a> (a) contact.html (b) Art corner (c) games.html (d) about.html - 36.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
-
37.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Jamun</li>
<li>Guava</li>
<li>Grapes</li>
<li>Orange</li>
</ul> - 38.True or false: <a> goes in the head. (a) True (b) False
- 39.🔍 Which is the odd one out? (a) colours code to help us (b) saves our .html files (c) shows line numbers (d) answers page requests
- 40.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h4> or <h3>? (a) <h3> (b) <h4> (c) <h6> (d) <h1>
Answer key
- sends pages over the net
- <ol>
- in a new tab
- </h3>
- element
- line 3
- shows line numbers
- line 3
- line 3
- True
- 400
- <!--
- 1
- Yes
- True
- </h2>
- Birthday cake
- A red kite
- <h1>
- 1
- an attribute
- the body
- turns HTML into a page
- False
- My Hobbies
- in the head
- a web browser
- 3
- 1
- 200
- True
- in the body
- an empty tag
- 2
- games.html
- <ul>
- 5
- False
- answers page requests
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids