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 a basic web page file, which comes LAST? (a) </head> (b) <body> (c) </html> (d) </body>
- 2.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 3.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 4.True or false: in <img>, width sets how wide it is. (a) False (b) True
- 5.🌍 Which program shows a web page to us? (a) a paint program (b) a music player (c) a web browser (d) a calculator
-
6.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h2>My best friend</h2>
<h2>I love mangoes.</h2>
<p>Our school trip</p>
<p>Cricket is fun.</p> - 7.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
8.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<p>Good morning!</p> (a) My pets (b) Rain today (c) Good morning! (d) I love mangoes. -
9.🔗 Where does this link open?
<a href="art.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 10.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
- 11.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
- 12.Which of these goes in the body? (a) <style> (b) <title> (c) <meta charset="utf-8"> (d) <a>
- 13.💬 How does an HTML comment end? (a) --> (b) >> (c) // (d) */
- 14.True or false: <ol> lists things in any order. (a) False (b) True
- 15.Which of these is a closing tag? (a) <li> (b) <h1> (c) </b> (d) <p>
- 16.📄 Can HTML on its own count button clicks? (a) No (b) Yes
-
17.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Rain today</p>
<p>Our school trip</p>
<!-- <p>My best friend</p> --> (a) My pets (b) Our school trip (c) Rain today (d) My best friend -
18.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<p>Hello, world!</p>
<!-- <p>Fun facts</p> --> (a) Fun facts (b) Hello, world! (c) My pets (d) I love mangoes. - 19.True or false: <li> goes inside ul or ol. (a) False (b) True
- 20.True or false: <li> shows bullet points. (a) False (b) True
- 21.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h2>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
- 22.True or false: in <img>, width names the picture file. (a) True (b) False
-
23.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) Contact us (b) About us (c) https://example.com (d) href -
24.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>The red kite</p>
<!-- <p>I love mangoes.</p> --> - 25.True or false: <b> has a closing tag. (a) False (b) True
-
26.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Papaya</li>
<li>Banana</li>
<li>Jamun</li>
</ol> -
27.🔍 One closing tag is missing. Which one?
<b>The red kite</b>
<strong>My best friend</strong>
<h1>My pets (a) </strong> (b) </h1> (c) </h2> (d) </b> -
28.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>My best friend</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>Fun facts</p> --> -
29.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Litchi</li>
<li>Banana</li>
<li>Orange</li>
<li>Mango</li>
</ul> - 30.True or false: a code editor has an address bar. (a) False (b) True
-
31.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<p>My best friend</p>
<!-- <p>The red kite</p> --> - 32.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
- 33.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
- 34.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
-
35.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="50"> - 36.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
-
37.🔗 Which words do you click on?
<a href="maths.html">Contact us</a> (a) Contact us (b) href (c) Visit the site (d) maths.html -
38.📋 What number does the browser show next to “Guava”?
<ol>
<li>Jamun</li>
<li>Guava</li>
<li>Grapes</li>
<li>Banana</li>
<li>Papaya</li>
<li>Orange</li>
</ol> -
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="200"> (a) width (b) kite.png (c) A red kite (d) Map of India -
40.📋 What number does the browser show next to “Jamun”?
<ol start="7">
<li>Banana</li>
<li>Litchi</li>
<li>Mango</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Grapes</li>
</ol>
Answer key
- </html>
- Yes
- an empty tag
- True
- a web browser
- 3
- an opening tag
- I love mangoes.
- in a new tab
- <a>
- <ol>
- <a>
- -->
- False
- </b>
- No
- My best friend
- Fun facts
- True
- False
- <h5>
- False
- About us
- 2
- True
- 4
- </h1>
- 1
- 5
- False
- 2
- <h1>
- <!DOCTYPE html>
- <a href="about.html">
- 50
- as one space
- Contact us
- 2
- A red kite
- 10
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids