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.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) High Tech (c) Home Text (d) HyperText
-
2.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="300"> (a) cake.jpg (b) dog.jpg (c) map.png (d) Map of India - 3.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) <head>
- 4.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
5.🔗 Which words do you click on?
<a href="news.html">School news</a> (a) news.html (b) href (c) Take the quiz (d) School news -
6.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>My pets</p> -->
<p>Hello, world!</p>
<p>My best friend</p> - 7.True or false: a web browser colours code to help us. (a) True (b) False
- 8.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 9.True or false: <ol> shows bullet points. (a) True (b) False
- 10.💬 How does an HTML comment start? (a) # (b) /* (c) <!-- (d) //
- 11.Which of these goes in the head? (a) <ul> (b) <h1> (c) <p> (d) <title>
-
12.🔗 Where does this link open?
<a href="art.html">Take the quiz</a> (a) in a new tab (b) in the same tab - 13.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <table> (c) <title> (d) <link rel="stylesheet">
- 14.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) width (d) alt
- 15.🖼️ Which attribute of <img> tells which image to load? (a) src (b) alt (c) height (d) width
-
16.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>My drawings</h1>
<p>I like to read.</p>
</body>
</html> (a) My drawings (b) My Hobbies (c) index.html (d) I like to read. - 17.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
18.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Banana</li>
<li>Mango</li>
<li>Papaya</li>
<li>Jamun</li>
</ol> -
19.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="100"> (a) tiger.jpg (b) kite.png (c) An old fort (d) fort.jpg - 20.Which of these goes in the head? (a) <h1> (b) <style> (c) <table> (d) <a>
- 21.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
- 22.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 23.True or false: in <img>, src describes the picture. (a) True (b) False
-
24.🔍 Which line is missing its closing tag?
line 1: <h3>Our school trip</h3>
line 2: <i>Cricket is fun.</i>
line 3: <u>Good morning! (a) line 1 (b) line 2 (c) line 3 - 25.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3> (c) </h3> (d) <h3/>
- 26.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
-
27.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Banana</li>
<li>Jamun</li>
<li>Guava</li>
<li>Mango</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> - 28.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 29.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
- 30.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>
- 31.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) height (c) width (d) src
- 32.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 33.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
34.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>Rain today</p> (a) Hello, world! (b) Cricket is fun. (c) Good morning! (d) Rain today - 35.🔢 In a basic web page file, which comes first: “<head>” or “<body>”? (a) <head> (b) <body>
- 36.True or false: a code editor opens web pages for us. (a) True (b) False
- 37.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h5>? (a) <h4> (b) <h2> (c) <h1> (d) <h5>
-
38.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red<br>Rivers flow</p> - 39.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b> (c) <b/> (d) <\b>
- 40.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
Answer key
- HyperText
- map.png
- <!DOCTYPE html>
- has a closing tag
- School news
- 2
- False
- Yes
- False
- <!--
- <title>
- in the same tab
- <table>
- alt
- src
- My Hobbies
- has a closing tag
- 5
- fort.jpg
- <style>
- 1
- a closing tag
- False
- line 3
- </h3>
- -->
- 6
- an opening tag
- element
- <a href="about.html">
- alt
- an opening tag
- a closing tag
- Good morning!
- <head>
- False
- <h1>
- 3
- </b>
- <ul>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids