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 text will NOT show on the page?
<p>Rain today</p>
<!-- <p>My best friend</p> -->
<p>Hello, world!</p> (a) My best friend (b) Rain today (c) Hello, world! - 2.True or false: in <img>, width sets how wide it is. (a) False (b) True
- 3.True or false: <input> has a closing tag. (a) True (b) False
- 4.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 5.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a href="about.html">
- 6.True or false: in <img>, alt is read by screen readers. (a) True (b) False
- 7.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
-
8.🔗 Which words do you click on?
<a href="about.html">School news</a> (a) href (b) Take the quiz (c) School news (d) about.html -
9.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) index.html (b) We won by 5 runs. (c) Class 7 Blog (d) Planets - 10.True or false: in <img>, src names the picture file. (a) False (b) True
-
11.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h3>Good morning!</h3>
<h3>Good morning!</h3>
<h3>Good morning!</h3> - 12.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 6 (d) 3
- 13.Which of these is true of a web browser? (a) saves our .html files (b) stores a website’s files (c) shows pages from the web (d) is where we type code
- 14.Which of these is a closing tag? (a) <li> (b) <body> (c) </h1> (d) <h1>
-
15.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="50"> -
16.🔗 Which words do you click on?
<a href="art.html">Maths fun</a> (a) Art corner (b) href (c) Maths fun (d) art.html -
17.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h3>Our school trip</h3>
<p>Good morning!</p>
<h2>My best friend</h2>
<h4>My pets</h4> -
18.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>My pets</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) My pets (c) Rain today - 19.True or false: <p> goes in the head. (a) False (b) True
- 20.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
- 21.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h6> (d) <h1>
- 22.True or false: in <img>, width describes the picture. (a) True (b) False
-
23.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Stars shine</p> - 24.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 25.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) turns HTML into a page (d) saves our .html files
- 26.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
-
27.🔗 Which address opens when you click this link?
<a href="maths.html">About us</a> (a) news.html (b) About us (c) maths.html (d) art.html - 28.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) in a big heading (d) at the bottom
-
29.🔗 Which words do you click on?
<a href="art.html">Take the quiz</a> (a) Take the quiz (b) Play games (c) art.html (d) href - 30.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h5>? (a) <h2> (b) <h1> (c) <h5> (d) <h6>
- 31.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) < (d) [
- 32.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
- 33.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a link (d) a picture
- 34.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
-
35.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="250"> (a) Map of India (b) map.png (c) cake.jpg (d) dog.jpg - 36.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a dollar $ (d) a hash #
- 37.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) hides the link (d) opens it in a new tab
- 38.🌐 Which one hosts websites online? (a) a code editor (b) a web browser (c) a web server
- 39.Which of these is true of a web browser? (a) shows line numbers (b) saves our .html files (c) turns HTML into a page (d) is where we type code
-
40.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>Our school trip</p>
<!-- <p>My pets</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
Answer key
- My best friend
- True
- False
- a closing tag
- <a href="about.html">
- True
- <li>
- School news
- Class 7 Blog
- True
- 4
- 1
- shows pages from the web
- </h1>
- 50
- Maths fun
- 4
- Rain today
- False
- <!--
- <h6>
- False
- 2
- has a closing tag
- turns HTML into a page
- True
- maths.html
- on the browser tab
- Take the quiz
- <h1>
- <
- a web server
- a line across the page
- 6
- map.png
- a slash /
- opens it in a new tab
- a web server
- turns HTML into a page
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids