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 heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h2>? (a) <h4> (b) <h2> (c) <h6> (d) <h1>
- 2.🔢 In a basic web page file, which comes first: “</head>” or “<head>”? (a) </head> (b) <head>
-
3.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>The red kite</p>
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p> (a) I love mangoes. (b) My best friend (c) The red kite (d) Rain today -
4.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p>
<p>My pets</p> - 5.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
- 6.📛 In <a href="x.html">, what is href? (a) an attribute (b) a comment (c) a closing tag (d) an element name
-
7.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Banana</li>
<li>Orange</li>
</ol> -
8.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Cricket is fun.</p>
<h2>Fun facts</h2> - 9.📝 What does <hr> draw? (a) a table (b) a link (c) a line across the page (d) a picture
- 10.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h5> or <h6>? (a) <h3> (b) <h5> (c) <h2> (d) <h6>
- 11.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
- 12.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <p> (d) <a>
-
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="150"> (a) Our school bus (b) width (c) bus.jpg (d) An old fort -
14.🔗 Which words do you click on?
<a href="quiz.html">Play games</a> (a) href (b) quiz.html (c) About us (d) Play games -
15.🔗 Which words do you click on?
<a href="maths.html">Art corner</a> (a) Art corner (b) href (c) School news (d) maths.html - 16.True or false: in <img>, alt describes the picture. (a) False (b) True
-
17.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) body (c) Welcome! (d) My Hobbies - 18.True or false: <p> is an empty tag. (a) False (b) True
- 19.📝 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 one space (d) as a dot
- 20.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
-
21.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p>
<p>Cricket is fun.</p> -
22.🔗 Which address opens when you click this link?
<a href="games.html">About us</a> (a) contact.html (b) games.html (c) about.html (d) About us - 23.Which of these is a closing tag? (a) </title> (b) <p> (c) <b> (d) <title>
- 24.Which of these is true of a web browser? (a) stores a website’s files (b) colours code to help us (c) shows line numbers (d) opens web pages for us
- 25.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h6>? (a) <h3> (b) <h5> (c) <h6> (d) <h4>
- 26.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
-
27.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) bus.jpg (b) A happy dog (c) dog.jpg (d) moon.png - 28.📄 Can HTML on its own pick a random number? (a) No (b) Yes
- 29.💬 Does the browser show comments on the page? (a) No (b) Yes
- 30.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h1>? (a) <h4> (b) <h2> (c) <h1> (d) <h3>
-
31.🔗 Which address opens when you click this link?
<a href="maths.html">About us</a> (a) art.html (b) maths.html (c) news.html (d) About us - 32.🌐 Which one saves our .html files? (a) a web browser (b) a code editor (c) a web server
- 33.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
-
34.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Orange</li>
<li>Litchi</li>
</ul> (a) bullets (b) numbers - 35.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
- 36.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <ul> (d) <hr>
-
37.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h4>I love mangoes.</h4>
<h3>Cricket is fun.</h3> -
38.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>I love mangoes.</h3>
<h2>Good morning!</h2>
<h4>Hello, world!</h4>
<p>Good morning!</p> - 39.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 40.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h1>
Answer key
- <h1>
- <head>
- Rain today
- 4
- <h1>
- an attribute
- 6
- 2
- a line across the page
- <h6>
- <ul>
- <img>
- Our school bus
- Play games
- Art corner
- True
- Welcome!
- False
- as one space
- a web browser
- 2
- games.html
- </title>
- opens web pages for us
- <h6>
- a slash /
- dog.jpg
- No
- No
- <h1>
- maths.html
- a code editor
- href
- bullets
- <li>
- <ul>
- 3
- 4
- in the head
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids