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 paragraphs does this code make?
<p>I love mangoes.</p>
<p>My best friend</p>
<h2>Rain today</h2>
<p>My best friend</p>
<p>My pets</p>
<p>Cricket is fun.</p> -
2.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>My pets</p>
<!-- <p>Good morning!</p> --> (a) Good morning! (b) Hello, world! (c) My pets - 3.True or false: in <img>, src names the picture file. (a) True (b) False
- 4.🔗 Which attribute holds the address of a link? (a) id (b) href (c) alt (d) src
- 5.Which of these goes in the body? (a) <ul> (b) <style> (c) <meta charset="utf-8"> (d) <title>
-
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) width (b) dog.jpg (c) The full moon (d) A happy dog -
7.🔗 Which address opens when you click this link?
<a href="news.html">About us</a> (a) quiz.html (b) games.html (c) news.html (d) About us -
8.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Our school trip</p> -->
<p>The red kite</p>
<!-- <p>I love mangoes.</p> -->
<p>My pets</p> -
9.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h4>My best friend</h4>
<p>Fun facts</p> - 10.True or false: <li> shows bullet points. (a) False (b) True
- 11.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h2> or <h4>? (a) <h6> (b) <h5> (c) <h2> (d) <h4>
- 12.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 13.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
14.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>My best friend</p>
<p>Rain today</p>
<p>I love mangoes.</p>
<h2>My pets</h2> - 15.Which of these is true of a code editor? (a) sends pages over the net (b) has an address bar (c) shows pages from the web (d) colours code to help us
-
16.🔍 One closing tag is missing. Which one?
<b>Our school trip</b>
<p>Hello, world!
<em>I love mangoes.</em> (a) </h1> (b) </p> (c) </b> (d) </em> - 17.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
18.🔗 Which words do you click on?
<a href="games.html">About us</a> (a) Contact us (b) games.html (c) About us (d) href -
19.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>The red kite</p> -->
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p> -
20.🔗 Which address opens when you click this link?
<a href="quiz.html">Art corner</a> (a) about.html (b) games.html (c) Art corner (d) quiz.html - 21.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
-
22.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Our school trip</p>
<!-- <p>Rain today</p> --> -
23.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p> (a) Our school trip (b) Good morning! (c) I love mangoes. (d) Cricket is fun. - 24.💬 Does the browser show comments on the page? (a) Yes (b) No
-
25.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p>
<p>My best friend</p> (a) My best friend (b) Our school trip (c) Hello, world! - 26.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
-
27.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Good morning!</p>
<p>My pets</p> -
28.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<p>Our school trip</p>
<!-- <p>My best friend</p> --> (a) Our school trip (b) I love mangoes. (c) My best friend (d) My pets - 29.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) in a big heading (d) on the browser tab
- 30.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h1> (d) <h6>
-
31.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p>
<p>Fun facts</p> (a) Cricket is fun. (b) Fun facts (c) I love mangoes. - 32.Which of these is true of a web server? (a) hosts websites online (b) colours code to help us (c) turns HTML into a page (d) shows pages from the web
-
33.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> --> -
34.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Birds sing</p> - 35.Which of these is an empty tag? (a) <br> (b) <h1> (c) <p> (d) <title>
- 36.💬 How does an HTML comment end? (a) // (b) >> (c) --> (d) */
- 37.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 38.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as one space (c) as a dot (d) as 5 spaces
-
39.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) https://example.com (b) href (c) Play games (d) About us - 40.True or false: <meta> has a closing tag. (a) True (b) False
Answer key
- 5
- Good morning!
- True
- href
- <ul>
- A happy dog
- news.html
- 3
- 2
- False
- <h2>
- in the head
- No
- 2
- colours code to help us
- </p>
- an opening tag
- About us
- 2
- quiz.html
- <ul>
- 2
- Our school trip
- No
- Hello, world!
- <li>
- 2
- My best friend
- on the browser tab
- <h6>
- Cricket is fun.
- hosts websites online
- 2
- 2
- <br>
- -->
- in the head
- as one space
- Play games
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids