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 show on the page?
<p>The red kite</p>
<p>I love mangoes.</p>
<p>My pets</p>
<!-- <p>Good morning!</p> --> - 2.🌐 Which one is where we type code? (a) a web server (b) a code editor (c) a web browser
- 3.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 4.True or false: a web server saves our .html files. (a) True (b) False
-
5.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Hello, world!</p>
<p>Good morning!</p>
<h3>My best friend</h3>
<h4>The red kite</h4> - 6.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
- 7.True or false: HTML on its own cannot run a game loop. (a) True (b) False
-
8.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) The red kite (c) Rain today - 9.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 10.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
-
11.🔍 Which line is missing its closing tag?
line 1: <h1>Rain today
line 2: <em>Fun facts</em>
line 3: <h3>I love mangoes.</h3> (a) line 2 (b) line 3 (c) line 1 -
12.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<!-- <p>Our school trip</p> -->
<!-- <p>I love mangoes.</p> --> - 13.True or false: <li> is an unordered list. (a) False (b) True
-
14.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p>
<p>Hello, world!</p>
<p>My pets</p> -
15.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="400"> -
16.🔍 One closing tag is missing. Which one?
<small>I love mangoes.</small>
<i>Good morning!</i>
<em>Our school trip (a) </i> (b) </small> (c) </em> (d) </u> - 17.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
- 18.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
-
19.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Guava</li>
<li>Grapes</li>
</ol> (a) bullets (b) numbers - 20.True or false: HTML on its own can make links to pages. (a) True (b) False
- 21.Which of these is a closing tag? (a) <h1> (b) </li> (c) <p> (d) <body>
- 22.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a slash / (d) a hash #
- 23.📄 Can HTML on its own count button clicks? (a) No (b) Yes
- 24.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 25.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
-
26.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Banana</li>
<li>Grapes</li>
<li>Guava</li>
<li>Litchi</li>
</ol> - 27.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) src (d) height
-
28.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) A happy dog (b) moon.png (c) bus.jpg (d) dog.jpg -
29.🔗 Which address opens when you click this link?
<a href="contact.html">Maths fun</a> (a) https://example.com (b) maths.html (c) Maths fun (d) contact.html -
30.🔗 Which address opens when you click this link?
<a href="news.html">About us</a> (a) quiz.html (b) About us (c) games.html (d) news.html - 31.Which of these has a closing tag? (a) <b> (b) <img> (c) <hr> (d) <br>
- 32.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) src (d) alt
- 33.Which of these is true of a code editor? (a) answers page requests (b) sends pages over the net (c) hosts websites online (d) shows line numbers
- 34.Which of these has a closing tag? (a) <hr> (b) <br> (c) <li> (d) <img>
-
35.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<p>Our school trip</p> (a) Hello, world! (b) Rain today (c) Our school trip - 36.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 37.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 38.True or false: a web browser has an address bar. (a) True (b) False
-
39.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red<br>Birds sing</p> - 40.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
Answer key
- 3
- a code editor
- in the body
- False
- 3
- <ol>
- True
- The red kite
- Yes
- 6
- line 1
- 1
- False
- 3
- 400
- </em>
- <ul>
- <h6>
- numbers
- True
- </li>
- a slash /
- No
- in the body
- <ul>
- 2
- alt
- dog.jpg
- contact.html
- news.html
- <b>
- width
- shows line numbers
- <li>
- Rain today
- a closing tag
- an empty tag
- True
- 3
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids