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 of these goes in the body? (a) <title> (b) <style> (c) <meta charset="utf-8"> (d) <h1>
- 2.True or false: in <img>, alt names the picture file. (a) True (b) False
- 3.Which of these is true of a web browser? (a) has an address bar (b) answers page requests (c) stores a website’s files (d) hosts websites online
-
4.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) body (b) I like to read. (c) Riya’s Recipes (d) All about me -
5.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>My pets</p>
<p>My pets</p> - 6.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
-
7.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Good morning!</p>
<h2>Our school trip</h2> - 8.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
-
9.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) index.html (b) We won by 5 runs. (c) My Hobbies (d) Match report - 10.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
- 11.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) turns HTML into a page (d) is where we type code
- 12.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
- 13.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h6> or <h3>? (a) <h4> (b) <h6> (c) <h3> (d) <h2>
- 14.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
- 15.True or false: <table> goes in the head. (a) True (b) False
- 16.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 17.True or false: a web server hosts websites online. (a) False (b) True
-
18.🔗 Where does this link open?
<a href="maths.html">Art corner</a> (a) in a new tab (b) in the same tab -
19.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow<br>Stars shine<br>Roses are red<br>Kites fly high</p> - 20.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 21.📄 Can HTML on its own run a game loop? (a) No (b) Yes
-
22.🔗 Which address opens when you click this link?
<a href="contact.html">Visit the site</a> (a) https://example.com (b) contact.html (c) Visit the site (d) maths.html - 23.Which of these has a closing tag? (a) <b> (b) <input> (c) <hr> (d) <br>
-
24.🔗 Which words do you click on?
<a href="maths.html">Play games</a> (a) Play games (b) href (c) maths.html (d) About us -
25.🔗 Which address opens when you click this link?
<a href="quiz.html">Visit the site</a> (a) Visit the site (b) games.html (c) about.html (d) quiz.html -
26.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="250"> (a) width (b) An old fort (c) A tiger asleep (d) fort.jpg - 27.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h1> or <h2>? (a) <h1> (b) <h2> (c) <h4> (d) <h6>
- 28.True or false: <img> goes in the body. (a) False (b) True
- 29.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h4>? (a) <h5> (b) <h2> (c) <h4> (d) <h1>
- 30.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h3> (d) <h4>
-
31.🔗 Which words do you click on?
<a href="games.html">About us</a> (a) games.html (b) Contact us (c) About us (d) href - 32.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h6>? (a) <h5> (b) <h3> (c) <h6> (d) <h2>
- 33.Which of these is true of a code editor? (a) shows pages from the web (b) turns HTML into a page (c) opens web pages for us (d) is where we type code
-
34.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) index.html (c) Cricket Club (d) My drawings -
35.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) All about me (b) index.html (c) Try this poha. (d) Art Gallery - 36.Which of these is true of a web browser? (a) stores a website’s files (b) sends pages over the net (c) answers page requests (d) opens web pages for us
- 37.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h1> or <h5>? (a) <h1> (b) <h5> (c) <h6> (d) <h4>
-
38.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow</p> - 39.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 40.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
Answer key
- <h1>
- False
- has an address bar
- All about me
- 1
- a web server
- 2
- <a>
- My Hobbies
- a web server
- turns HTML into a page
- <a href="about.html">
- <h2>
- starts a new line
- False
- has a closing tag
- True
- in the same tab
- 5
- in the head
- No
- contact.html
- <b>
- Play games
- quiz.html
- An old fort
- <h6>
- True
- <h1>
- <h1>
- About us
- <h2>
- is where we type code
- Cricket Club
- Art Gallery
- opens web pages for us
- <h6>
- 2
- an opening tag
- <ul>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids