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) answers page requests (b) colours code to help us (c) is where we type code (d) turns HTML into a page
-
2.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Litchi</li>
</ul> (a) bullets (b) numbers - 3.🔢 In a basic web page file, which comes first: “</body>” or “<head>”? (a) <head> (b) </body>
- 4.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
-
5.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) body (b) Try this poha. (c) Class 7 Blog (d) My drawings -
6.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h4>My pets</h4>
<h4>Our school trip</h4>
<h3>My pets</h3> -
7.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Mango</li>
<li>Litchi</li>
</ul> - 8.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h3>? (a) <h3> (b) <h6> (c) <h1> (d) <h5>
-
9.🔗 Which words do you click on?
<a href="art.html">Maths fun</a> (a) art.html (b) Art corner (c) Maths fun (d) href - 10.True or false: <a> goes in the body. (a) True (b) False
-
11.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>I love mangoes.</h2>
<p>The red kite</p> -
12.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Guava</li>
<li>Jamun</li>
<li>Litchi</li>
</ol> - 13.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 14.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) { (d) (
- 15.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
-
16.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> (a) tiger.jpg (b) A red kite (c) A tiger asleep (d) width - 17.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 18.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <p> (d) <h3>
- 19.🖼️ Which tag puts a picture on a page? (a) <a> (b) <img> (c) <pic> (d) <p>
- 20.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h6>? (a) <h3> (b) <h6> (c) <h5> (d) <h2>
- 21.Which of these is an empty tag? (a) <ul> (b) <h1> (c) <title> (d) <meta>
- 22.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 23.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
- 24.📄 Can HTML on its own count button clicks? (a) No (b) Yes
- 25.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
- 26.Which of these is true of a web browser? (a) sends pages over the net (b) colours code to help us (c) has an address bar (d) saves our .html files
- 27.🏷️ Which is the closing tag for <u>? (a) <u/> (b) <u> (c) <\u> (d) </u>
- 28.🔍 Which is the odd one out? (a) sends pages over the net (b) is where we type code (c) hosts websites online (d) answers page requests
- 29.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b> (c) <b/> (d) <\b>
- 30.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
- 31.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
- 32.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
-
33.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets -
34.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h2>Fun facts</h2>
<h3>I love mangoes.</h3> - 35.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h1>? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
- 36.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
- 37.True or false: <img> has a closing tag. (a) True (b) False
- 38.Which of these is an opening tag? (a) </body> (b) </b> (c) </h1> (d) <h1>
- 39.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 40.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as a dot (c) as 5 spaces (d) as one space
Answer key
- answers page requests
- bullets
- <head>
- False
- My drawings
- 4
- 3
- <h6>
- Maths fun
- True
- 2
- 2
- in the body
- <
- starts a new line
- A tiger asleep
- in the body
- <h6>
- <img>
- <h6>
- <meta>
- in the body
- in the body
- No
- <h1>
- has an address bar
- </u>
- is where we type code
- </b>
- a web server
- <!DOCTYPE html>
- <!--
- bullets
- 3
- <h6>
- opens it in a new tab
- False
- <h1>
- Yes
- as one space
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids