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 headings are in this code?
<h1>Our school trip</h1>
<h2>My pets</h2>
<h2>I love mangoes.</h2>
<p>Hello, world!</p> - 2.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
-
3.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Banana</li>
<li>Jamun</li>
</ul> (a) bullets (b) numbers - 4.True or false: a web browser opens web pages for us. (a) False (b) True
-
5.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h2>Good morning!</h2>
<h3>My pets</h3> -
6.🔍 One closing tag is missing. Which one?
<h1>Fun facts</h1>
<p>Cricket is fun.
<b>My pets</b> (a) </h1> (b) </b> (c) </p> (d) </small> - 7.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) alt (d) width
-
8.🔍 Which line is missing its closing tag?
line 1: <h2>Cricket is fun.
line 2: <u>Rain today</u>
line 3: <p>The red kite</p> (a) line 1 (b) line 3 (c) line 2 - 9.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h2>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
- 10.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
-
11.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="50"> -
12.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Banana</li>
<li>Grapes</li>
</ol> - 13.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
-
14.🔗 Which words do you click on?
<a href="about.html">Art corner</a> (a) href (b) about.html (c) School news (d) Art corner - 15.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
-
16.🔗 Where does this link open?
<a href="news.html" target="_blank">School news</a> (a) in the same tab (b) in a new tab - 17.Which of these is a closing tag? (a) <li> (b) <p> (c) <b> (d) </title>
-
18.🔍 One closing tag is missing. Which one?
<p>My pets
<strong>Hello, world!</strong>
<em>Our school trip</em> (a) </i> (b) </strong> (c) </em> (d) </p> - 19.🏷️ Which is the closing tag for <p>? (a) <p> (b) <\p> (c) </p> (d) <p/>
-
20.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>Good morning!</h2>
<p>Our school trip</p> - 21.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <!DOCTYPE html> (b) <html>
-
22.🔍 One closing tag is missing. Which one?
<u>I love mangoes.
<small>My best friend</small>
<i>Cricket is fun.</i> (a) </i> (b) </h3> (c) </u> (d) </small> -
23.🔗 Which words do you click on?
<a href="news.html">About us</a> (a) Contact us (b) news.html (c) href (d) About us - 24.True or false: in <img>, src is read by screen readers. (a) True (b) False
- 25.True or false: <li> lists things in any order. (a) True (b) False
- 26.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
- 27.True or false: in <img>, alt sets how tall it is. (a) True (b) False
- 28.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
-
29.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Orange</li>
<li>Grapes</li>
</ol> - 30.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
- 31.True or false: in <img>, src tells which image to load. (a) False (b) True
-
32.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="300"> (a) An old fort (b) fort.jpg (c) width (d) A tiger asleep - 33.True or false: <img> goes in the body. (a) False (b) True
- 34.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
- 35.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
-
36.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Our school trip</p>
<!-- <p>My pets</p> --> (a) My pets (b) Our school trip (c) Fun facts -
37.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) href (b) Art corner (c) School news (d) games.html - 38.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
-
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="150"> (a) Birthday cake (b) map.png (c) width (d) Map of India -
40.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) body (b) Try this poha. (c) Riya’s Recipes (d) Welcome!
Answer key
- 3
- <h1>
- bullets
- True
- 3
- </p>
- width
- line 1
- <h1>
- a web server
- 50
- 3
- <h6>
- Art corner
- <!DOCTYPE html>
- in a new tab
- </title>
- </p>
- </p>
- 2
- <!DOCTYPE html>
- </u>
- About us
- False
- False
- a web browser
- False
- <ul>
- 3
- a web browser
- True
- An old fort
- True
- <a>
- in the body
- My pets
- Art corner
- 1
- Map of India
- Welcome!
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids