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 true of a web browser? (a) colours code to help us (b) stores a website’s files (c) is where we type code (d) has an address bar
- 2.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <p> (d) <h1>
-
3.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>My pets</p>
<h2>Hello, world!</h2>
<h2>Hello, world!</h2> -
4.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>My drawings</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) body (c) My Hobbies (d) My drawings - 5.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h2>? (a) <h1> (b) <h2> (c) <h6> (d) <h3>
- 6.Which of these goes in the head? (a) <h1> (b) <p> (c) <table> (d) <title>
-
7.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="200"> - 8.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
- 9.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h1> or <h6>? (a) <h4> (b) <h1> (c) <h6> (d) <h3>
- 10.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
- 11.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h1> or <h3>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
-
12.🔗 Where does this link open?
<a href="maths.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab -
13.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Good morning!</p>
<h2>Rain today</h2>
<p>I love mangoes.</p>
<p>Rain today</p>
<p>Cricket is fun.</p> - 14.True or false: a code editor stores a website’s files. (a) True (b) False
- 15.🔠 How many heading levels does HTML have? (a) 4 (b) 6 (c) 3 (d) 10
- 16.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
- 17.📄 Can HTML on its own pick a random number? (a) Yes (b) No
-
18.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Our school trip</p>
<p>Fun facts</p>
<p>Cricket is fun.</p> (a) Our school trip (b) My pets (c) Fun facts (d) Cricket is fun. - 19.True or false: <ul> is an empty tag. (a) True (b) False
- 20.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
- 21.🌐 Which one turns HTML into a page? (a) a web server (b) a web browser (c) a code editor
- 22.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
- 23.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
24.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>My best friend</p>
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> --> (a) I love mangoes. (b) My best friend (c) My pets (d) Our school trip -
25.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>The red kite</p>
<p>Good morning!</p> (a) Good morning! (b) Hello, world! (c) The red kite -
26.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Mango</li>
<li>Banana</li>
<li>Papaya</li>
</ol> -
27.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Papaya</li>
</ul> (a) numbers (b) bullets -
28.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="400"> (a) Birthday cake (b) dog.jpg (c) moon.png (d) cake.jpg -
29.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>Rain today</h2>
<p>Good morning!</p>
<p>My best friend</p>
<p>My pets</p>
<h2>Our school trip</h2> - 30.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1/> (c) <\h1> (d) <h1>
- 31.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
32.🔍 One closing tag is missing. Which one?
<b>Fun facts
<i>I love mangoes.</i>
<p>My best friend</p> (a) </em> (b) </p> (c) </b> (d) </i> -
33.🔍 One closing tag is missing. Which one?
<h2>Our school trip</h2>
<p>Cricket is fun.
<strong>My best friend</strong> (a) </strong> (b) </i> (c) </h2> (d) </p> - 34.Which of these is an opening tag? (a) <body> (b) </li> (c) </body> (d) </title>
-
35.🔗 Which address opens when you click this link?
<a href="https://example.com">Maths fun</a> (a) maths.html (b) https://example.com (c) art.html (d) Maths fun - 36.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 37.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <p> (d) <h6>
- 38.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
-
39.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>Rain today</p> -->
<p>Fun facts</p>
<p>Hello, world!</p> (a) Hello, world! (b) Rain today (c) Good morning! (d) Fun facts -
40.🔗 Which address opens when you click this link?
<a href="art.html">Contact us</a> (a) art.html (b) Contact us (c) quiz.html (d) news.html
Answer key
- has an address bar
- <h1>
- 2
- My drawings
- <h6>
- <title>
- 200
- a web server
- <h1>
- <!DOCTYPE html>
- <h4>
- in a new tab
- 5
- False
- 6
- <h4>
- No
- My pets
- False
- in the body
- a web browser
- <a href="about.html">
- Yes
- Our school trip
- Hello, world!
- 6
- bullets
- cake.jpg
- 4
- </h1>
- a closing tag
- </b>
- </p>
- <body>
- https://example.com
- has a closing tag
- <h6>
- No
- Rain today
- art.html
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids