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 words do you click on?
<a href="games.html">School news</a> (a) href (b) Take the quiz (c) School news (d) games.html - 2.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
- 3.📄 Can HTML on its own make tables? (a) No (b) Yes
- 4.True or false: in <img>, height sets how wide it is. (a) False (b) True
- 5.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 6.📝 What does <p> make? (a) a picture (b) a table (c) a paragraph (d) a link
-
7.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Mango</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Litchi</li>
</ul> -
8.📋 What number does the browser show next to “Papaya”?
<ol start="5">
<li>Grapes</li>
<li>Jamun</li>
<li>Papaya</li>
</ol> - 9.True or false: HTML on its own cannot make a form. (a) False (b) True
-
10.🔗 Where does this link open?
<a href="art.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 11.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) address (d) attribute
-
12.🔍 Which line is missing its closing tag?
line 1: <em>Rain today</em>
line 2: <strong>Hello, world!
line 3: <b>Our school trip</b> (a) line 1 (b) line 3 (c) line 2 -
13.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<!-- <p>My best friend</p> -->
<!-- <p>Fun facts</p> --> - 14.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) turns HTML into a page (d) sends pages over the net
-
15.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) About us (b) href (c) Contact us (d) https://example.com - 16.🖼️ Which attribute of <img> describes the picture? (a) width (b) alt (c) height (d) src
- 17.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 18.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h1>? (a) <h6> (b) <h2> (c) <h5> (d) <h1>
-
19.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>My best friend</h2>
<h2>Rain today</h2>
<h2>Hello, world!</h2>
<p>Our school trip</p> - 20.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
- 21.Which of these has a closing tag? (a) <br> (b) <img> (c) <title> (d) <input>
-
22.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>My drawings</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) index.html (c) My Hobbies (d) My drawings - 23.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
-
24.🔗 Which words do you click on?
<a href="news.html">About us</a> (a) href (b) About us (c) news.html (d) Contact us -
25.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<!-- <p>Cricket is fun.</p> -->
<p>Rain today</p>
<p>My pets</p> (a) Fun facts (b) Cricket is fun. (c) My pets (d) Rain today - 26.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) </h2> (d) <h2/>
-
27.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) Welcome! (b) Try this poha. (c) Cricket Club (d) index.html - 28.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h1> or <h2>? (a) <h5> (b) <h1> (c) <h4> (d) <h2>
-
29.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="400"> (a) cake.jpg (b) Birthday cake (c) dog.jpg (d) moon.png -
30.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Litchi</li>
</ol> (a) numbers (b) bullets -
31.🔗 Where does this link open?
<a href="art.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab -
32.🔗 Which words do you click on?
<a href="https://example.com">Contact us</a> (a) https://example.com (b) href (c) Visit the site (d) Contact us - 33.Which of these is true of a web server? (a) saves our .html files (b) sends pages over the net (c) turns HTML into a page (d) shows pages from the web
- 34.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
35.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Hello, world!</p>
<p>My pets</p>
<p>My best friend</p> -
36.📋 What number does the browser show next to “Orange”?
<ol>
<li>Banana</li>
<li>Mango</li>
<li>Orange</li>
<li>Guava</li>
<li>Papaya</li>
</ol> - 37.Which of these is an opening tag? (a) </body> (b) </p> (c) <li> (d) </h1>
- 38.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
39.🔍 One closing tag is missing. Which one?
<small>Cricket is fun.
<u>Fun facts</u>
<p>My pets</p> (a) </p> (b) </small> (c) </b> (d) </u> -
40.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>My pets</p>
<h2>Fun facts</h2>
Answer key
- School news
- <!DOCTYPE html>
- Yes
- False
- a closing tag
- a paragraph
- 6
- 7
- False
- in a new tab
- element
- line 2
- 1
- turns HTML into a page
- About us
- alt
- has a closing tag
- <h1>
- 2
- <h6>
- <title>
- My Hobbies
- <ul>
- About us
- Cricket is fun.
- </h2>
- Cricket Club
- <h5>
- cake.jpg
- numbers
- in a new tab
- Contact us
- sends pages over the net
- an opening tag
- 4
- 3
- <li>
- No
- </small>
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids