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.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Guava</li>
<li>Jamun</li>
<li>Grapes</li>
</ul> -
2.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) games.html (b) Visit the site (c) href (d) Maths fun -
3.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> --> (a) Cricket is fun. (b) I love mangoes. (c) My pets -
4.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>I love mangoes.</p>
<p>Fun facts</p> - 5.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 6.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 7.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server
-
8.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="200"> (a) bus.jpg (b) dog.jpg (c) A happy dog (d) moon.png - 9.🏷️ Which is the closing tag for <small>? (a) <small/> (b) <\small> (c) </small> (d) <small>
- 10.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h3>? (a) <h6> (b) <h2> (c) <h3> (d) <h1>
-
11.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue</p> - 12.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
- 13.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
14.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Papaya</li>
<li>Orange</li>
</ol> - 15.True or false: in <img>, alt is read by screen readers. (a) False (b) True
-
16.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>My pets</p>
<h2>Good morning!</h2>
<p>Fun facts</p> - 17.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h6> or <h4>? (a) <h4> (b) <h3> (c) <h6> (d) <h5>
- 18.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
- 19.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h2>? (a) <h2> (b) <h5> (c) <h3> (d) <h1>
- 20.💬 How does an HTML comment end? (a) --> (b) // (c) >> (d) */
- 21.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
- 22.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
-
23.🔗 Where does this link open?
<a href="news.html">Visit the site</a> (a) in a new tab (b) in the same tab - 24.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
25.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="400"> -
26.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="200"> (a) cake.jpg (b) A red kite (c) map.png (d) kite.png -
27.🔍 Which line is missing its closing tag?
line 1: <b>My best friend
line 2: <em>My pets</em>
line 3: <strong>Cricket is fun.</strong> (a) line 3 (b) line 2 (c) line 1 -
28.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>My pets</h2>
<h2>My best friend</h2>
<p>My best friend</p> - 29.True or false: <table> goes in the head. (a) True (b) False
- 30.Which of these goes in the head? (a) <style> (b) <table> (c) <img> (d) <a>
-
31.🔗 Where does this link open?
<a href="art.html">About us</a> (a) in a new tab (b) in the same tab -
32.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Fun facts</p>
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> --> -
33.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>My best friend</p>
<!-- <p>I love mangoes.</p> --> - 34.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Markup (c) Mouse (d) Machine
- 35.True or false: HTML on its own can show paragraphs. (a) False (b) True
-
36.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h4>Rain today</h4>
<h2>The red kite</h2> - 37.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
38.📋 What number does the browser show next to “Jamun”?
<ol start="7">
<li>Litchi</li>
<li>Guava</li>
<li>Jamun</li>
</ol> - 39.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
- 40.Which of these has a closing tag? (a) <meta> (b) <h1> (c) <br> (d) <input>
Answer key
- 4
- Visit the site
- I love mangoes.
- 1
- an opening tag
- a closing tag
- a web browser
- dog.jpg
- </small>
- <h1>
- 2
- <
- an empty tag
- 3
- True
- 3
- <h6>
- <a>
- <h1>
- -->
- <a href="about.html">
- to leave notes
- in the same tab
- Yes
- 400
- kite.png
- line 1
- 3
- False
- <style>
- in the same tab
- 3
- 2
- Markup
- True
- 3
- has a closing tag
- 9
- opens it in a new tab
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids