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 <h1> headings should a page usually have? (a) 10 (b) 1 (c) 3 (d) 6
-
2.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Rain today</p>
<p>My pets</p>
<p>The red kite</p>
<p>Good morning!</p> - 3.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Machine (d) Markup
- 4.Which of these is true of a code editor? (a) is where we type code (b) answers page requests (c) turns HTML into a page (d) opens web pages for us
- 5.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
-
6.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) Play games (b) href (c) About us (d) games.html - 7.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h6> or <h4>? (a) <h6> (b) <h4> (c) <h5> (d) <h2>
-
8.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My best friend</p>
<h2>Cricket is fun.</h2>
<p>Fun facts</p>
<p>Rain today</p> - 9.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) an element name (d) a comment
- 10.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <ol> (d) <p>
- 11.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h1> (b) <h3> (c) <h6> (d) <h2>
-
12.🔗 Where does this link open?
<a href="games.html">About us</a> (a) in the same tab (b) in a new tab - 13.Which of these is true of a web browser? (a) colours code to help us (b) turns HTML into a page (c) sends pages over the net (d) shows line numbers
-
14.🔍 Which line is missing its closing tag?
line 1: <b>My best friend</b>
line 2: <small>I love mangoes.
line 3: <h2>Cricket is fun.</h2> (a) line 3 (b) line 1 (c) line 2 - 15.🔍 Which is the odd one out? (a) saves our .html files (b) hosts websites online (c) stores a website’s files (d) sends pages over the net
- 16.📝 What do we need to write HTML? (a) a printer (b) a microphone (c) a paintbrush (d) a plain text editor
-
17.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> --> -
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) An old fort (b) width (c) Our school bus (d) bus.jpg -
19.📋 What number does the browser show next to “Banana”?
<ol start="4">
<li>Grapes</li>
<li>Banana</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Mango</li>
<li>Guava</li>
</ol> -
20.🔗 Which address opens when you click this link?
<a href="contact.html">School news</a> (a) maths.html (b) https://example.com (c) School news (d) contact.html - 21.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 22.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h5>? (a) <h2> (b) <h4> (c) <h1> (d) <h5>
- 23.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 24.True or false: <li> has a closing tag. (a) True (b) False
- 25.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h6> or <h3>? (a) <h1> (b) <h6> (c) <h5> (d) <h3>
- 26.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h1>? (a) <h2> (b) <h4> (c) <h1> (d) <h6>
-
27.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) maths.html (b) Contact us (c) https://example.com (d) contact.html -
28.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Hello, world!</p>
<p>Fun facts</p>
<!-- <p>My pets</p> --> (a) My pets (b) Hello, world! (c) Our school trip (d) Fun facts - 29.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h2> or <h5>? (a) <h4> (b) <h6> (c) <h2> (d) <h5>
- 30.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h4>? (a) <h3> (b) <h2> (c) <h1> (d) <h4>
-
31.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Hello, world!</p>
<p>Our school trip</p>
<p>Fun facts</p> (a) Our school trip (b) My best friend (c) Hello, world! (d) Fun facts - 32.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) nowhere (d) in a big heading
- 33.Which of these goes in the head? (a) <h1> (b) <meta charset="utf-8"> (c) <table> (d) <img>
-
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="150"> (a) A happy dog (b) width (c) cake.jpg (d) Birthday cake -
35.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing<br>Sky is blue</p> -
36.🔍 One closing tag is missing. Which one?
<em>Good morning!</em>
<small>Fun facts
<u>Hello, world!</u> (a) </small> (b) </u> (c) </em> (d) </b> - 37.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <li> (c) <ol>
- 38.True or false: <li> is an empty tag. (a) False (b) True
- 39.🏷️ Which is the closing tag for <i>? (a) <i> (b) </i> (c) <\i> (d) <i/>
- 40.True or false: <p> goes in the head. (a) True (b) False
Answer key
- 1
- 5
- Markup
- is where we type code
- in the head
- Play games
- <h2>
- 2
- an attribute
- <li>
- <h1>
- in the same tab
- turns HTML into a page
- line 2
- saves our .html files
- a plain text editor
- 1
- Our school bus
- 5
- contact.html
- in the head
- <h1>
- an opening tag
- True
- <h6>
- <h6>
- contact.html
- My pets
- <h6>
- <h4>
- My best friend
- on the browser tab
- <meta charset="utf-8">
- Birthday cake
- 3
- </small>
- <ol>
- False
- </i>
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids