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 is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) </h1> (d) <h1>
-
2.🔗 Where does this link open?
<a href="art.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab - 3.🔍 Which is the odd one out? (a) turns HTML into a page (b) has an address bar (c) is where we type code (d) opens web pages for us
-
4.🔗 Which words do you click on?
<a href="about.html">Visit the site</a> (a) href (b) Visit the site (c) about.html (d) Maths fun - 5.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </body> (c) <head> (d) <body>
- 6.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
- 7.🔍 Which is the odd one out? (a) stores a website’s files (b) colours code to help us (c) hosts websites online (d) sends pages over the net
-
8.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high<br>Stars shine<br>Birds sing</p> - 9.True or false: <title> goes in the body. (a) True (b) False
- 10.Which of these goes in the head? (a) <h1> (b) <a> (c) <meta charset="utf-8"> (d) <img>
- 11.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
- 12.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <body> (b) <!DOCTYPE html>
- 13.True or false: in <img>, width sets how wide it is. (a) False (b) True
- 14.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to make it bigger (d) to colour it
- 15.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
16.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="100"> - 17.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <ul> (c) <a> (d) <h1>
-
18.🔗 Which words do you click on?
<a href="art.html">Visit the site</a> (a) href (b) art.html (c) Maths fun (d) Visit the site - 19.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
-
20.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Hello, world!</p>
<p>I love mangoes.</p> -
21.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p> - 22.💾 A web page file usually ends with which extension? (a) .png (b) .txt (c) .html (d) .mp3
- 23.💬 Does the browser show comments on the page? (a) Yes (b) No
- 24.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h4> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
- 25.Which of these is true of a code editor? (a) turns HTML into a page (b) has an address bar (c) hosts websites online (d) saves our .html files
- 26.True or false: in <img>, alt sets how wide it is. (a) True (b) False
-
27.🔍 Which line is missing its closing tag?
line 1: <em>Fun facts</em>
line 2: <h3>The red kite
line 3: <strong>Rain today</strong> (a) line 3 (b) line 1 (c) line 2 -
28.🔗 Where does this link open?
<a href="about.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab -
29.📋 What number does the browser show next to “Orange”?
<ol>
<li>Jamun</li>
<li>Orange</li>
<li>Mango</li>
</ol> -
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) A red kite (b) width (c) tiger.jpg (d) A tiger asleep - 31.Which of these is true of a web server? (a) has an address bar (b) turns HTML into a page (c) stores a website’s files (d) saves our .html files
-
32.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="100"> (a) moon.png (b) fort.jpg (c) The full moon (d) bus.jpg -
33.📄 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) body (b) My Hobbies (c) Thanks for visiting. (d) Welcome! - 34.Which of these is an opening tag? (a) </body> (b) </b> (c) </title> (d) <p>
- 35.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
-
36.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) All about me (c) Class 7 Blog (d) index.html - 37.True or false: <title> goes in the head. (a) False (b) True
- 38.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
-
39.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p>
<!-- <p>My best friend</p> --> - 40.📄 Can HTML on its own make headings? (a) No (b) Yes
Answer key
- </h1>
- in a new tab
- is where we type code
- Visit the site
- <!DOCTYPE html>
- 1
- colours code to help us
- 4
- False
- <meta charset="utf-8">
- <a>
- <!DOCTYPE html>
- True
- to describe the image
- Yes
- 100
- <link rel="stylesheet">
- Visit the site
- a web browser
- 1
- 2
- .html
- No
- <h1>
- saves our .html files
- False
- line 2
- in a new tab
- 2
- A tiger asleep
- stores a website’s files
- moon.png
- Welcome!
- <p>
- <img>
- Class 7 Blog
- True
- <
- 3
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids