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.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) Welcome! (c) body (d) Art Gallery -
2.🔗 Which address opens when you click this link?
<a href="art.html">Play games</a> (a) art.html (b) news.html (c) Play games (d) quiz.html - 3.Which of these has a closing tag? (a) <ul> (b) <input> (c) <br> (d) <img>
- 4.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <html> (c) <head> (d) <!DOCTYPE html>
-
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="200"> (a) bus.jpg (b) An old fort (c) width (d) Our school bus - 6.True or false: HTML on its own can show paragraphs. (a) True (b) False
- 7.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <h3> (c) <\h3> (d) </h3>
- 8.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
9.🔗 Where does this link open?
<a href="maths.html" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab - 10.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
11.📋 What number does the browser show next to “Orange”?
<ol>
<li>Papaya</li>
<li>Jamun</li>
<li>Orange</li>
</ol> - 12.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
- 13.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h5>? (a) <h6> (b) <h4> (c) <h5> (d) <h3>
- 14.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the body (d) the head
-
15.🔗 Where does this link open?
<a href="maths.html">School news</a> (a) in a new tab (b) in the same tab - 16.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h2>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
- 17.Which of these is true of a web browser? (a) stores a website’s files (b) opens web pages for us (c) colours code to help us (d) saves our .html files
- 18.🔢 In a basic web page file, which comes LAST? (a) <head> (b) <!DOCTYPE html> (c) <body> (d) </html>
- 19.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
-
20.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Fun facts</p>
<p>Our school trip</p> (a) My pets (b) Our school trip (c) Fun facts - 21.True or false: a web server saves our .html files. (a) True (b) False
-
22.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>The red kite</h2>
<p>Cricket is fun.</p>
<p>My best friend</p>
<p>Cricket is fun.</p>
<p>Good morning!</p> - 23.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
- 24.True or false: <br> has a closing tag. (a) True (b) False
-
25.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Rain today</p> -->
<p>Fun facts</p> -
26.🔍 Which line is missing its closing tag?
line 1: <small>I love mangoes.
line 2: <h3>Fun facts</h3>
line 3: <b>Hello, world!</b> (a) line 1 (b) line 2 (c) line 3 -
27.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<p>Fun facts</p>
<!-- <p>My best friend</p> -->
<!-- <p>My pets</p> --> - 28.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
-
29.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Cricket is fun.</p>
<h2>Hello, world!</h2>
<h3>My pets</h3> - 30.🏷️ HTML marks up text using ___. (a) keys (b) pixels (c) tags (d) wires
- 31.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
-
32.🔍 Which line is missing its closing tag?
line 1: <em>Cricket is fun.</em>
line 2: <i>My best friend
line 3: <small>I love mangoes.</small> (a) line 2 (b) line 3 (c) line 1 - 33.💾 A web page file usually ends with which extension? (a) .mp3 (b) .html (c) .txt (d) .png
- 34.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <html> (d) <body>
-
35.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p> (a) Hello, world! (b) Our school trip (c) I love mangoes. - 36.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
- 37.🏷️ Which is the closing tag for <p>? (a) </p> (b) <p/> (c) <\p> (d) <p>
- 38.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
-
39.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue<br>Rivers flow<br>Roses are red</p> - 40.🌐 Which one colours code to help us? (a) a web server (b) a web browser (c) a code editor
Answer key
- Welcome!
- art.html
- <ul>
- <!DOCTYPE html>
- Our school bus
- True
- </h3>
- Yes
- in a new tab
- has a closing tag
- 3
- <h6>
- <h3>
- the body
- in the same tab
- <h5>
- opens web pages for us
- </html>
- a web browser
- My pets
- False
- 5
- on the browser tab
- False
- 2
- line 1
- 2
- <
- 3
- tags
- in the head
- line 2
- .html
- <!DOCTYPE html>
- I love mangoes.
- <ul>
- </p>
- <ul>
- 4
- a code editor
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids