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 picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="100"> (a) tiger.jpg (b) fort.jpg (c) kite.png (d) An old fort - 2.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
- 3.Which of these is a closing tag? (a) </body> (b) <title> (c) <body> (d) <p>
- 4.True or false: <ol> shows bullet points. (a) True (b) False
- 5.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
-
6.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p> (a) Fun facts (b) Cricket is fun. (c) My best friend (d) Hello, world! - 7.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <pic> (d) <img>
-
8.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="300"> -
9.🔗 Which words do you click on?
<a href="news.html">Take the quiz</a> (a) news.html (b) href (c) Take the quiz (d) Play games - 10.True or false: HTML on its own can run a game loop. (a) True (b) False
- 11.True or false: <style> goes in the body. (a) False (b) True
- 12.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
- 13.📝 What does <p> make? (a) a table (b) a picture (c) a paragraph (d) a link
-
14.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>My best friend</p>
<p>Good morning!</p>
<!-- <p>Fun facts</p> --> (a) Fun facts (b) I love mangoes. (c) Good morning! (d) My best friend -
15.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>My pets</p>
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p> (a) Our school trip (b) My pets (c) I love mangoes. (d) Cricket is fun. - 16.True or false: <table> goes in the body. (a) False (b) True
- 17.Which of these is true of a web browser? (a) colours code to help us (b) answers page requests (c) opens web pages for us (d) is where we type code
-
18.🔗 Which address opens when you click this link?
<a href="about.html">Maths fun</a> (a) about.html (b) contact.html (c) Maths fun (d) https://example.com - 19.📄 Can HTML on its own pick a random number? (a) No (b) Yes
- 20.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
21.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>My pets</h2>
<p>Fun facts</p>
<h2>Hello, world!</h2>
<p>Fun facts</p> -
22.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>My pets</p>
<h2>Good morning!</h2>
<h3>The red kite</h3>
<p>I love mangoes.</p> - 23.Which of these is true of a web server? (a) stores a website’s files (b) has an address bar (c) opens web pages for us (d) colours code to help us
-
24.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>My pets</p> -->
<p>My best friend</p> - 25.Which of these is an opening tag? (a) <h1> (b) </b> (c) </h1> (d) </title>
- 26.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <p> (d) <ul>
- 27.True or false: HTML on its own cannot run a game loop. (a) False (b) True
-
28.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Mango</li>
<li>Papaya</li>
<li>Guava</li>
<li>Litchi</li>
<li>Banana</li>
<li>Orange</li>
</ol> - 29.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) on the browser tab (d) nowhere
-
30.🔗 Where does this link open?
<a href="about.html">Play games</a> (a) in a new tab (b) in the same tab - 31.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
- 32.True or false: a web browser answers page requests. (a) False (b) True
- 33.True or false: a code editor shows pages from the web. (a) False (b) True
-
34.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Guava</li>
<li>Banana</li>
</ul> (a) bullets (b) numbers -
35.🔍 One closing tag is missing. Which one?
<h3>Fun facts</h3>
<h2>Rain today</h2>
<u>Cricket is fun. (a) </h3> (b) </small> (c) </u> (d) </h2> - 36.True or false: in <img>, alt is read by screen readers. (a) True (b) False
- 37.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <table> (d) <style>
- 38.True or false: <li> is an empty tag. (a) True (b) False
- 39.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 40.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <p> (c) <\p> (d) </p>
Answer key
- fort.jpg
- 6
- </body>
- False
- in the body
- Cricket is fun.
- <img>
- 300
- Take the quiz
- False
- False
- <h6>
- a paragraph
- Fun facts
- Cricket is fun.
- True
- opens web pages for us
- about.html
- No
- Yes
- 3
- 3
- stores a website’s files
- 2
- <h1>
- <li>
- True
- 2
- on the browser tab
- in the same tab
- <ol>
- False
- False
- bullets
- </u>
- True
- <table>
- False
- No
- </p>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids