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.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Birds sing<br>Roses are red</p> - 2.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h4>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
- 3.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) opens web pages for us (d) colours code to help us
-
4.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Papaya</li>
<li>Orange</li>
<li>Banana</li>
<li>Guava</li>
<li>Mango</li>
</ol> - 5.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
- 6.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
- 7.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <p> (d) <h3>
- 8.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <!DOCTYPE html> (d) <html>
- 9.💬 How does an HTML comment end? (a) --> (b) // (c) >> (d) */
-
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="50"> (a) width (b) Birthday cake (c) map.png (d) Map of India - 11.True or false: a web server is where we type code. (a) False (b) True
- 12.True or false: <ul> lists steps in order. (a) True (b) False
-
13.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="300"> - 14.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 15.Which of these is true of a code editor? (a) turns HTML into a page (b) opens web pages for us (c) sends pages over the net (d) saves our .html files
- 16.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <ul> (c) <li>
-
17.🔍 One closing tag is missing. Which one?
<h2>I love mangoes.
<strong>My best friend</strong>
<b>Cricket is fun.</b> (a) </h2> (b) </b> (c) </strong> (d) </h3> - 18.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 19.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 20.🌐 Which one sends pages over the net? (a) a web server (b) a code editor (c) a web browser
-
21.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>My best friend</p>
<p>I love mangoes.</p> (a) My best friend (b) I love mangoes. (c) Hello, world! -
22.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="250"> - 23.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) makes it blank (d) hides the link
-
24.🔗 Where does this link open?
<a href="games.html">Visit the site</a> (a) in the same tab (b) in a new tab - 25.True or false: in <img>, alt tells which image to load. (a) False (b) True
- 26.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
- 27.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
-
28.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Here is my best one.</p>
</body>
</html> (a) My drawings (b) Here is my best one. (c) Class 7 Blog (d) index.html -
29.📋 What number does the browser show next to “Banana”?
<ol start="5">
<li>Grapes</li>
<li>Banana</li>
<li>Guava</li>
<li>Jamun</li>
</ol> - 30.True or false: <br> has a closing tag. (a) False (b) True
- 31.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) saves our .html files (d) turns HTML into a page
- 32.True or false: in <img>, src names the picture file. (a) False (b) True
-
33.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<!-- <p>My pets</p> -->
<!-- <p>I love mangoes.</p> --> - 34.True or false: <h1> goes in the head. (a) False (b) True
- 35.Which of these is an empty tag? (a) <br> (b) <b> (c) <li> (d) <title>
- 36.True or false: a web server has an address bar. (a) False (b) True
-
37.🔍 Which line is missing its closing tag?
line 1: <small>The red kite</small>
line 2: <u>Cricket is fun.</u>
line 3: <b>My best friend (a) line 1 (b) line 3 (c) line 2 -
38.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Hello, world!</p>
<p>Good morning!</p>
<!-- <p>The red kite</p> --> (a) Good morning! (b) Rain today (c) The red kite (d) Hello, world! - 39.Which of these has a closing tag? (a) <br> (b) <img> (c) <b> (d) <hr>
-
40.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing<br>Stars shine</p>
Answer key
- 3
- <h5>
- opens web pages for us
- 6
- a web browser
- <!--
- <h6>
- <!DOCTYPE html>
- -->
- Map of India
- False
- False
- 300
- Yes
- saves our .html files
- <li>
- </h2>
- No
- an opening tag
- a web server
- Hello, world!
- 250
- opens it in a new tab
- in the same tab
- False
- <a href="about.html">
- <ul>
- Class 7 Blog
- 6
- False
- saves our .html files
- True
- 1
- False
- <br>
- False
- line 3
- The red kite
- <b>
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids