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.🌐 Which one shows line numbers? (a) a code editor (b) a web server (c) a web browser
- 2.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
- 3.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
- 4.True or false: <table> goes in the body. (a) True (b) False
- 5.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) answers page requests (d) turns HTML into a page
-
6.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Grapes</li>
</ol> -
7.🔗 Which words do you click on?
<a href="games.html">Maths fun</a> (a) games.html (b) href (c) Maths fun (d) Art corner -
8.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>Cricket is fun.</h2>
<h2>Hello, world!</h2> -
9.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Grapes</li>
<li>Mango</li>
</ol> - 10.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h2>? (a) <h2> (b) <h4> (c) <h3> (d) <h1>
-
11.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Kites fly high<br>Roses are red<br>Rivers flow<br>Birds sing</p> - 12.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h6> or <h5>? (a) <h3> (b) <h2> (c) <h6> (d) <h5>
- 13.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h3> or <h6>? (a) <h3> (b) <h1> (c) <h4> (d) <h6>
- 14.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
- 15.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
16.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow<br>Stars shine<br>Birds sing<br>Kites fly high</p> -
17.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>My pets</p>
<p>Good morning!</p>
<p>The red kite</p>
<p>My pets</p>
<p>Fun facts</p> - 18.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 19.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) src (d) id
-
20.🔍 One closing tag is missing. Which one?
<b>Fun facts
<h1>Rain today</h1>
<p>The red kite</p> (a) </h1> (b) </b> (c) </small> (d) </p> - 21.True or false: HTML on its own cannot pick a random number. (a) True (b) False
-
22.🔍 Which line is missing its closing tag?
line 1: <em>Cricket is fun.</em>
line 2: <i>Fun facts</i>
line 3: <h2>The red kite (a) line 2 (b) line 1 (c) line 3 - 23.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 24.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dollar $ (c) a hash # (d) a dot .
-
25.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Good morning!</p>
<!-- <p>My best friend</p> --> -
26.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p>
<!-- <p>Our school trip</p> --> -
27.📋 What number does the browser show next to “Orange”?
<ol>
<li>Mango</li>
<li>Banana</li>
<li>Orange</li>
<li>Jamun</li>
</ol> - 28.True or false: HTML on its own can pick a random number. (a) True (b) False
- 29.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
-
30.🔗 Which address opens when you click this link?
<a href="art.html">About us</a> (a) art.html (b) news.html (c) About us (d) quiz.html - 31.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h3>? (a) <h1> (b) <h2> (c) <h3> (d) <h4>
- 32.Which of these has a closing tag? (a) <input> (b) <li> (c) <br> (d) <img>
- 33.🔍 Which is the odd one out? (a) stores a website’s files (b) shows pages from the web (c) answers page requests (d) hosts websites online
-
34.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Our school trip</p>
<h2>My best friend</h2> - 35.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
- 36.📝 What does <br> do? (a) starts a new line (b) makes a list (c) makes text bold (d) adds a picture
- 37.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 38.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
- 39.🔢 In a basic web page file, which comes first: “<html>” or “</html>”? (a) </html> (b) <html>
- 40.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h1> or <h2>? (a) <h1> (b) <h2> (c) <h6> (d) <h3>
Answer key
- a code editor
- <img>
- a web browser
- True
- answers page requests
- 2
- Maths fun
- 3
- 5
- <h4>
- 5
- <h2>
- <h6>
- to leave notes
- an opening tag
- 5
- 6
- Yes
- href
- </b>
- True
- line 3
- No
- a slash /
- 2
- 1
- 3
- False
- a web server
- art.html
- <h4>
- <li>
- shows pages from the web
- 2
- <!DOCTYPE html>
- starts a new line
- in the body
- element
- <html>
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids