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 BIGGEST text: <h3>, <h1>, <h6> or <h4>? (a) <h6> (b) <h4> (c) <h3> (d) <h1>
- 2.📝 What does <p> make? (a) a table (b) a picture (c) a link (d) a paragraph
-
3.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p>
<p>Cricket is fun.</p> -
4.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>Good morning!</p> -->
<p>My best friend</p>
<p>Fun facts</p> -
5.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>My pets</p>
<!-- <p>My best friend</p> --> - 6.True or false: <p> goes in the body. (a) True (b) False
-
7.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Banana</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Mango</li>
</ol> - 8.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 9.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 10.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to make it bigger (d) to load it faster
-
11.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="50"> -
12.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<!-- <p>Fun facts</p> --> - 13.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h3>? (a) <h6> (b) <h5> (c) <h2> (d) <h3>
- 14.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h2>? (a) <h2> (b) <h3> (c) <h1> (d) <h5>
- 15.📄 Can HTML on its own make links to pages? (a) No (b) Yes
- 16.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h3> or <h5>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
- 17.Which of these is an opening tag? (a) <p> (b) </title> (c) </li> (d) </p>
-
18.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) map.png (b) kite.png (c) A tiger asleep (d) tiger.jpg -
19.🔗 Which words do you click on?
<a href="https://example.com">Art corner</a> (a) https://example.com (b) Art corner (c) href (d) School news - 20.🔍 Which is the odd one out? (a) shows line numbers (b) turns HTML into a page (c) colours code to help us (d) is where we type code
- 21.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h6> (d) <h1>
-
22.🔗 Which words do you click on?
<a href="about.html">Play games</a> (a) href (b) about.html (c) About us (d) Play games - 23.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
-
24.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) index.html (b) Space Facts (c) Try this poha. (d) Easy snacks - 25.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
- 26.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
- 27.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h3>? (a) <h5> (b) <h6> (c) <h4> (d) <h3>
-
28.🔍 Which line is missing its closing tag?
line 1: <strong>The red kite</strong>
line 2: <u>Cricket is fun.</u>
line 3: <h3>My best friend (a) line 2 (b) line 3 (c) line 1 -
29.🔗 Which words do you click on?
<a href="about.html">Contact us</a> (a) Contact us (b) href (c) about.html (d) Visit the site - 30.Which of these is an opening tag? (a) <b> (b) </li> (c) </b> (d) </p>
-
31.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow</p> - 32.Which of these is true of a code editor? (a) opens web pages for us (b) saves our .html files (c) stores a website’s files (d) sends pages over the net
- 33.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h6> (d) <h1>
- 34.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h6>? (a) <h6> (b) <h5> (c) <h4> (d) <h2>
-
35.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Guava</li>
<li>Litchi</li>
</ol> (a) bullets (b) numbers - 36.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
- 37.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
-
38.🔍 One closing tag is missing. Which one?
<h3>Cricket is fun.</h3>
<strong>Hello, world!</strong>
<u>Good morning! (a) </strong> (b) </em> (c) </u> (d) </h3> - 39.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
-
40.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<p>My best friend</p> (a) Hello, world! (b) My best friend (c) Rain today
Answer key
- <h1>
- a paragraph
- 2
- 2
- 2
- True
- 5
- has a closing tag
- an opening tag
- to describe the image
- 50
- 2
- <h2>
- <h1>
- Yes
- <h5>
- <p>
- tiger.jpg
- Art corner
- turns HTML into a page
- <h6>
- Play games
- <li>
- Space Facts
- href
- opens it in a new tab
- <h3>
- line 3
- Contact us
- <b>
- 2
- saves our .html files
- <h6>
- <h2>
- numbers
- <a href="about.html">
- <!--
- </u>
- False
- Hello, world!
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids