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: <h4>, <h1>, <h6> or <h2>? (a) <h1> (b) <h2> (c) <h4> (d) <h6>
- 2.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
- 3.Which of these has a closing tag? (a) <meta> (b) <hr> (c) <br> (d) <h1>
-
4.🔍 One closing tag is missing. Which one?
<h1>Fun facts
<strong>I love mangoes.</strong>
<h2>Good morning!</h2> (a) </strong> (b) </h2> (c) </h3> (d) </h1> -
5.🔍 Which line is missing its closing tag?
line 1: <small>Cricket is fun.</small>
line 2: <u>My best friend
line 3: <strong>I love mangoes.</strong> (a) line 1 (b) line 2 (c) line 3 -
6.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> -->
<p>Hello, world!</p> -
7.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<p>My best friend</p> (a) Rain today (b) Hello, world! (c) My best friend -
8.🔗 Where does this link open?
<a href="art.html">Take the quiz</a> (a) in a new tab (b) in the same tab -
9.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>My pets</h2>
<h2>Cricket is fun.</h2>
<p>My pets</p> - 10.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
- 11.🌐 Which one shows line numbers? (a) a code editor (b) a web server (c) a web browser
- 12.📝 What does <p> make? (a) a paragraph (b) a link (c) a picture (d) a table
- 13.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <a> (d) <p>
-
14.🔗 Which address opens when you click this link?
<a href="news.html">Maths fun</a> (a) Maths fun (b) news.html (c) quiz.html (d) games.html -
15.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) news.html (b) href (c) Visit the site (d) Maths fun - 16.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
- 17.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h2>? (a) <h6> (b) <h3> (c) <h2> (d) <h1>
-
18.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Rain today</p>
<h2>Our school trip</h2>
<p>Good morning!</p>
<h2>Good morning!</h2>
<p>Cricket is fun.</p> - 19.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h6> or <h4>? (a) <h2> (b) <h4> (c) <h6> (d) <h3>
- 20.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as one space (d) as 5 spaces
- 21.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) address (d) element
- 22.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 4 (d) 6
- 23.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h6>? (a) <h6> (b) <h1> (c) <h5> (d) <h3>
- 24.True or false: <title> has a closing tag. (a) False (b) True
-
25.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<p>My pets</p> - 26.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 27.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h6>? (a) <h6> (b) <h2> (c) <h1> (d) <h4>
- 28.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
29.🔗 Where does this link open?
<a href="about.html">Contact us</a> (a) in a new tab (b) in the same tab - 30.True or false: in <img>, alt tells which image to load. (a) False (b) True
- 31.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
-
32.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Good morning!</p>
<p>The red kite</p>
<p>Cricket is fun.</p> (a) Cricket is fun. (b) The red kite (c) Good morning! (d) My best friend - 33.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h1> or <h5>? (a) <h1> (b) <h5> (c) <h3> (d) <h4>
-
34.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<p>The red kite</p> (a) Cricket is fun. (b) Rain today (c) The red kite (d) I love mangoes. - 35.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <title> (d) <h1>
- 36.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) shows pages from the web (d) stores a website’s files
-
37.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Fun facts</p>
<h2>Our school trip</h2>
<h3>Our school trip</h3> -
38.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Guava</li>
<li>Orange</li>
</ol> - 39.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h5> or <h2>? (a) <h4> (b) <h2> (c) <h5> (d) <h3>
-
40.📄 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>Here is my best one.</p>
</body>
</html> (a) All about me (b) My Hobbies (c) index.html (d) Here is my best one.
Answer key
- <h6>
- in the body
- <h1>
- </h1>
- line 2
- 2
- Rain today
- in the same tab
- 3
- <ul>
- a code editor
- a paragraph
- <img>
- news.html
- Visit the site
- <
- <h6>
- 4
- <h2>
- as one space
- element
- 6
- <h1>
- True
- 2
- a closing tag
- <h1>
- No
- in the same tab
- False
- opens it in a new tab
- My best friend
- <h1>
- I love mangoes.
- <h1>
- shows pages from the web
- 3
- 3
- <h2>
- My Hobbies
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids