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 heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h4>? (a) <h4> (b) <h1> (c) <h3> (d) <h5>
- 2.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as a new line (d) as 5 spaces
-
3.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h3>Hello, world!</h3>
<p>The red kite</p>
<p>Hello, world!</p> -
4.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>My pets</p>
<p>Hello, world!</p>
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p> -
5.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Our school trip</p>
<p>My pets</p>
<h2>Cricket is fun.</h2> -
6.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Orange</li>
<li>Grapes</li>
<li>Mango</li>
</ol> - 7.True or false: <style> goes in the body. (a) True (b) False
-
8.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Orange</li>
</ol> -
9.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="350"> (a) The full moon (b) fort.jpg (c) moon.png (d) bus.jpg - 10.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
11.🔗 Which address opens when you click this link?
<a href="https://example.com">About us</a> (a) maths.html (b) art.html (c) https://example.com (d) About us - 12.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
- 13.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
-
14.📋 What number does the browser show next to “Guava”?
<ol start="3">
<li>Mango</li>
<li>Litchi</li>
<li>Guava</li>
<li>Grapes</li>
<li>Orange</li>
<li>Papaya</li>
</ol> -
15.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>I love mangoes.</p>
<h2>Hello, world!</h2> - 16.True or false: in <img>, src names the picture file. (a) True (b) False
- 17.Which of these is a closing tag? (a) <h1> (b) <p> (c) </body> (d) <li>
- 18.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h3>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
- 19.🏷️ Which is the closing tag for <u>? (a) </u> (b) <u/> (c) <\u> (d) <u>
- 20.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
- 21.True or false: <li> has a closing tag. (a) True (b) False
- 22.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <li> (d) <p>
- 23.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
- 24.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h6>? (a) <h6> (b) <h2> (c) <h1> (d) <h4>
- 25.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 26.True or false: in <img>, height describes the picture. (a) False (b) True
-
27.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> (a) kite.png (b) A tiger asleep (c) tiger.jpg (d) map.png -
28.🔍 One closing tag is missing. Which one?
<h1>The red kite
<h3>Our school trip</h3>
<strong>Fun facts</strong> (a) </h3> (b) </h2> (c) </strong> (d) </h1> -
29.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<p>My best friend</p>
<p>Cricket is fun.</p> (a) My pets (b) My best friend (c) Hello, world! (d) Cricket is fun. -
30.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="350"> -
31.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>The red kite</p> -->
<p>Fun facts</p>
<p>Good morning!</p> - 32.💬 Does the browser show comments on the page? (a) Yes (b) No
- 33.💾 A web page file usually ends with which extension? (a) .txt (b) .html (c) .mp3 (d) .png
- 34.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
- 35.True or false: <li> is an unordered list. (a) True (b) False
- 36.True or false: <ol> lists steps in order. (a) False (b) True
- 37.🔍 Which is the odd one out? (a) is where we type code (b) saves our .html files (c) answers page requests (d) colours code to help us
- 38.Which of these is true of a web server? (a) hosts websites online (b) is where we type code (c) opens web pages for us (d) colours code to help us
- 39.Which of these is an empty tag? (a) <li> (b) <hr> (c) <h1> (d) <p>
- 40.True or false: a code editor turns HTML into a page. (a) True (b) False
Answer key
- <h5>
- as one space
- 2
- 4
- 3
- 4
- False
- 2
- moon.png
- an empty tag
- https://example.com
- a slash /
- in the body
- 5
- 2
- True
- </body>
- <h1>
- </u>
- opens it in a new tab
- True
- <li>
- a line across the page
- <h1>
- a closing tag
- False
- tiger.jpg
- </h1>
- Hello, world!
- 350
- 2
- No
- .html
- <ol>
- False
- True
- answers page requests
- hosts websites online
- <hr>
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids