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.True or false: in <img>, src names the picture file. (a) False (b) True
- 2.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h4>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>
- 3.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
-
4.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow</p> - 5.True or false: HTML on its own can make tables. (a) False (b) True
- 6.🌐 Which one shows line numbers? (a) a web server (b) a code editor (c) a web browser
- 7.True or false: a web browser stores a website’s files. (a) True (b) False
- 8.🔤 In “HTML”, what does the L stand for? (a) Line (b) Laptop (c) Language (d) Link
-
9.🔍 One closing tag is missing. Which one?
<h1>I love mangoes.
<h3>Hello, world!</h3>
<u>Good morning!</u> (a) </u> (b) </h2> (c) </h3> (d) </h1> - 10.🔍 Which is the odd one out? (a) hosts websites online (b) opens web pages for us (c) stores a website’s files (d) sends pages over the net
- 11.📄 Can HTML on its own pick a random number? (a) Yes (b) No
- 12.Which of these goes in the head? (a) <h1> (b) <a> (c) <p> (d) <style>
- 13.True or false: a code editor colours code to help us. (a) True (b) False
- 14.🔗 Which attribute holds the address of a link? (a) src (b) id (c) href (d) alt
- 15.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) [ (d) {
-
16.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="300"> (a) Map of India (b) width (c) kite.png (d) A red kite - 17.💬 Does the browser show comments on the page? (a) No (b) Yes
- 18.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
- 19.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) width (c) src (d) height
-
20.🔗 Which words do you click on?
<a href="about.html">Maths fun</a> (a) about.html (b) href (c) Art corner (d) Maths fun - 21.Which of these is true of a code editor? (a) stores a website’s files (b) shows pages from the web (c) saves our .html files (d) sends pages over the net
-
22.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine</p> -
23.🔍 One closing tag is missing. Which one?
<h3>Hello, world!</h3>
<u>My pets</u>
<strong>I love mangoes. (a) </u> (b) </b> (c) </strong> (d) </h3> -
24.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>Rain today</h3>
<h2>My best friend</h2> -
25.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Fun facts</p>
<p>Hello, world!</p> (a) Fun facts (b) Hello, world! (c) My best friend -
26.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Banana</li>
</ul> (a) bullets (b) numbers - 27.True or false: HTML on its own can pick a random number. (a) False (b) True
- 28.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
- 29.💬 How does an HTML comment end? (a) */ (b) --> (c) // (d) >>
-
30.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="150"> (a) map.png (b) cake.jpg (c) A red kite (d) kite.png -
31.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> --> (a) I love mangoes. (b) Cricket is fun. (c) Fun facts - 32.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h3> or <h6>? (a) <h5> (b) <h3> (c) <h6> (d) <h4>
- 33.🔍 Which is the odd one out? (a) saves our .html files (b) opens web pages for us (c) turns HTML into a page (d) has an address bar
-
34.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>My pets</p>
<p>My pets</p> -
35.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>My pets</p>
<h2>Rain today</h2>
<h4>My best friend</h4> -
36.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> -
37.🔍 One closing tag is missing. Which one?
<strong>The red kite
<p>Rain today</p>
<h1>Hello, world!</h1> (a) </p> (b) </strong> (c) </h1> (d) </b> - 38.True or false: in <img>, width describes the picture. (a) True (b) False
- 39.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <img> (d) <a>
-
40.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>The red kite</p>
<p>Our school trip</p> (a) Rain today (b) Our school trip (c) The red kite
Answer key
- True
- <h1>
- <ol>
- 2
- True
- a code editor
- False
- Language
- </h1>
- opens web pages for us
- No
- <style>
- True
- href
- <
- A red kite
- No
- the body
- width
- Maths fun
- saves our .html files
- 2
- </strong>
- 3
- My best friend
- bullets
- False
- <ul>
- -->
- kite.png
- Fun facts
- <h6>
- saves our .html files
- 3
- 3
- 350
- </strong>
- False
- <img>
- Rain today
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids