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 is an empty tag? (a) <h1> (b) <p> (c) <br> (d) <b>
-
2.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> --> - 3.🏷️ HTML marks up text using ___. (a) wires (b) keys (c) tags (d) pixels
- 4.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) sends pages over the net (d) shows pages from the web
-
5.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) My Hobbies (b) All about me (c) index.html (d) I like to read. - 6.📄 Can HTML on its own keep a high score? (a) No (b) Yes
- 7.Which of these is a closing tag? (a) </li> (b) <b> (c) <body> (d) <p>
- 8.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
- 9.Which of these is true of a web server? (a) shows pages from the web (b) has an address bar (c) colours code to help us (d) answers page requests
-
10.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>My best friend</p>
<p>My pets</p> - 11.Which of these is an opening tag? (a) <p> (b) </b> (c) </h1> (d) </li>
- 12.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
-
13.📋 What number does the browser show next to “Mango”?
<ol start="8">
<li>Orange</li>
<li>Mango</li>
<li>Banana</li>
</ol> - 14.🔢 In a basic web page file, which comes first: “<html>” or “<!DOCTYPE html>”? (a) <html> (b) <!DOCTYPE html>
- 15.True or false: a code editor is where we type code. (a) False (b) True
-
16.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>Rain today</p>
<!-- <p>My pets</p> --> (a) Hello, world! (b) Rain today (c) My pets -
17.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) School news (b) Art corner (c) games.html (d) href - 18.Which of these goes in the head? (a) <p> (b) <a> (c) <table> (d) <link rel="stylesheet">
- 19.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
-
20.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) games.html (b) Contact us (c) Visit the site (d) href - 21.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h6> or <h3>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
-
22.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>I love mangoes.</p>
<p>I love mangoes.</p>
<p>My pets</p> - 23.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
-
24.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Litchi</li>
<li>Jamun</li>
</ul> (a) bullets (b) numbers - 25.Which of these has a closing tag? (a) <br> (b) <img> (c) <ul> (d) <hr>
- 26.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
- 27.Which of these is true of a code editor? (a) shows pages from the web (b) sends pages over the net (c) has an address bar (d) is where we type code
-
28.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Our school trip</p>
<p>I love mangoes.</p>
<h4>Rain today</h4> - 29.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h3> or <h4>? (a) <h3> (b) <h6> (c) <h4> (d) <h2>
-
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="250"> (a) width (b) The full moon (c) dog.jpg (d) A happy dog - 31.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 32.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a dot . (d) a slash /
- 33.True or false: HTML on its own cannot make links to pages. (a) True (b) False
- 34.True or false: <table> goes in the head. (a) False (b) True
- 35.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) alt (d) width
- 36.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) Home Text (c) HyperText (d) High Tech
- 37.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h6> or <h4>? (a) <h2> (b) <h4> (c) <h1> (d) <h6>
-
38.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>Rain today</h2>
<h2>Hello, world!</h2>
<h2>Rain today</h2> -
39.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Hello, world!</p>
<p>Good morning!</p>
<p>Rain today</p> -
40.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Fun facts</p>
<p>Cricket is fun.</p>
<h2>The red kite</h2>
<h4>I love mangoes.</h4>
Answer key
- <br>
- 1
- tags
- shows pages from the web
- My Hobbies
- No
- </li>
- -->
- answers page requests
- 2
- <p>
- 1
- 9
- <!DOCTYPE html>
- True
- My pets
- Art corner
- <link rel="stylesheet">
- the body
- Contact us
- <h1>
- 4
- Yes
- bullets
- <ul>
- <ol>
- is where we type code
- 2
- <h2>
- A happy dog
- in the head
- a slash /
- False
- False
- alt
- HyperText
- <h6>
- 1
- 3
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids