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>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) All about me (b) body (c) Here is my best one. (d) Class 7 Blog -
2.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Good morning!</p> -->
<p>Rain today</p> -
3.🔗 Where does this link open?
<a href="maths.html">Art corner</a> (a) in the same tab (b) in a new tab - 4.True or false: in <img>, alt tells which image to load. (a) True (b) False
- 5.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small/> (c) <small> (d) </small>
- 6.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
- 7.🔍 Which is the odd one out? (a) has an address bar (b) turns HTML into a page (c) is where we type code (d) shows pages from the web
- 8.🏷️ Which is the closing tag for <u>? (a) </u> (b) <u/> (c) <\u> (d) <u>
-
9.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Kites fly high</p> -
10.🔗 Which words do you click on?
<a href="news.html">Play games</a> (a) news.html (b) About us (c) Play games (d) href - 11.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
-
12.🔍 Which line is missing its closing tag?
line 1: <strong>Cricket is fun.</strong>
line 2: <em>Our school trip</em>
line 3: <b>Fun facts (a) line 2 (b) line 3 (c) line 1 - 13.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
- 14.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
-
15.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) index.html (b) Mars is red. (c) Welcome! (d) Riya’s Recipes -
16.🔍 Which line is missing its closing tag?
line 1: <em>I love mangoes.</em>
line 2: <u>Cricket is fun.</u>
line 3: <small>My pets (a) line 2 (b) line 1 (c) line 3 - 17.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
18.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Cricket is fun.</p>
<h2>Fun facts</h2>
<h2>Fun facts</h2>
<h2>I love mangoes.</h2>
<p>The red kite</p> - 19.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h2> or <h6>? (a) <h6> (b) <h1> (c) <h2> (d) <h4>
- 20.Which of these is an empty tag? (a) <p> (b) <h1> (c) <li> (d) <br>
- 21.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
- 22.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
-
23.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>My pets</p>
<p>Good morning!</p> (a) My pets (b) Rain today (c) Good morning! -
24.🔗 Where does this link open?
<a href="contact.html">School news</a> (a) in a new tab (b) in the same tab -
25.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Banana</li>
<li>Litchi</li>
</ul> - 26.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
- 27.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
- 28.💬 Does the browser show comments on the page? (a) Yes (b) No
- 29.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 30.True or false: HTML on its own can make a form. (a) False (b) True
- 31.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h2> or <h3>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
- 32.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
- 33.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
-
34.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow<br>Roses are red</p> - 35.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
- 36.🔍 Which is the odd one out? (a) answers page requests (b) saves our .html files (c) is where we type code (d) colours code to help us
- 37.True or false: a web browser has an address bar. (a) True (b) False
- 38.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h4> or <h6>? (a) <h1> (b) <h4> (c) <h3> (d) <h6>
- 39.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) </h1> (c) <h1> (d) <\h1>
-
40.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Guava</li>
<li>Orange</li>
</ul>
Answer key
- All about me
- 2
- in the same tab
- False
- </small>
- False
- is where we type code
- </u>
- 2
- Play games
- <img>
- line 3
- width
- opens it in a new tab
- Riya’s Recipes
- line 3
- an opening tag
- 3
- <h1>
- <br>
- on the browser tab
- 6
- Rain today
- in the same tab
- 3
- <a>
- a web server
- No
- No
- True
- <h1>
- <li>
- <!--
- 3
- a web server
- answers page requests
- True
- <h1>
- </h1>
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids