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.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing<br>Stars shine</p> -
2.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>Hello, world!</h2>
<p>Cricket is fun.</p>
<p>The red kite</p> - 3.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures
- 4.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h6>? (a) <h2> (b) <h5> (c) <h6> (d) <h3>
- 5.Which of these is true of a web browser? (a) hosts websites online (b) saves our .html files (c) is where we type code (d) opens web pages for us
- 6.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 7.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1> (c) <h1/> (d) <\h1>
-
8.🔗 Where does this link open?
<a href="https://example.com">Art corner</a> (a) in the same tab (b) in a new tab - 9.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <hr> (d) <br>
- 10.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
- 11.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dollar $ (c) a hash # (d) a dot .
-
12.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>My best friend</p> -->
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p>
<p>Our school trip</p> -
13.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p>
<!-- <p>Our school trip</p> --> - 14.🔍 Which is the odd one out? (a) is where we type code (b) opens web pages for us (c) turns HTML into a page (d) has an address bar
- 15.Which of these is an empty tag? (a) <title> (b) <input> (c) <h1> (d) <li>
-
16.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<h2>Fun facts</h2>
<h2>The red kite</h2>
<p>Good morning!</p>
<p>The red kite</p> - 17.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 18.Which of these is an empty tag? (a) <img> (b) <p> (c) <li> (d) <h1>
-
19.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p> (a) Rain today (b) Cricket is fun. (c) The red kite - 20.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
- 21.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b> (c) <b/> (d) <\b>
- 22.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 23.True or false: a web browser has an address bar. (a) False (b) True
- 24.Which of these has a closing tag? (a) <img> (b) <p> (c) <meta> (d) <input>
- 25.True or false: in <img>, alt sets how wide it is. (a) False (b) True
- 26.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
-
27.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="200"> (a) Map of India (b) Birthday cake (c) map.png (d) width - 28.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
29.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Stars shine<br>Sky is blue</p> - 30.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 31.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 32.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 33.🧱 HTML gives a web page its ___. (a) sound (b) speed (c) structure (d) colours
- 34.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h1> or <h2>? (a) <h1> (b) <h2> (c) <h3> (d) <h5>
- 35.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
- 36.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
- 37.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
-
38.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Our school trip</p>
<h2>My best friend</h2> - 39.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
- 40.True or false: a code editor sends pages over the net. (a) True (b) False
Answer key
- 3
- 2
- to leave notes
- <h6>
- opens web pages for us
- a closing tag
- </h1>
- in the same tab
- <ol>
- <!--
- a slash /
- 2
- 1
- is where we type code
- <input>
- 4
- Yes
- <img>
- Cricket is fun.
- False
- </b>
- a closing tag
- True
- <p>
- False
- starts a new line
- Map of India
- in the head
- 3
- an opening tag
- has a closing tag
- an empty tag
- structure
- <h1>
- <a>
- True
- <ol>
- 2
- <ul>
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids