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 a closing tag? (a) </title> (b) <body> (c) <p> (d) <title>
- 2.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
- 3.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h4>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
-
4.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Rivers flow</p> -
5.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>My best friend</h2>
<p>Rain today</p> - 6.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) editor (d) element
-
7.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Hello, world!</p>
<p>The red kite</p> -
8.🔗 Which words do you click on?
<a href="contact.html">School news</a> (a) Take the quiz (b) contact.html (c) School news (d) href -
9.🔍 Which line is missing its closing tag?
line 1: <p>Rain today
line 2: <i>I love mangoes.</i>
line 3: <em>Fun facts</em> (a) line 3 (b) line 2 (c) line 1 - 10.💬 Does the browser show comments on the page? (a) No (b) Yes
-
11.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Rain today</p>
<p>My pets</p>
<p>I love mangoes.</p> -
12.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Fun facts</p> -->
<p>Good morning!</p>
<p>Cricket is fun.</p> -
13.🔍 One closing tag is missing. Which one?
<h2>My best friend
<small>Our school trip</small>
<i>My pets</i> (a) </b> (b) </h2> (c) </i> (d) </small> -
14.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> --> (a) Fun facts (b) Cricket is fun. (c) Rain today -
15.🔗 Which words do you click on?
<a href="art.html">School news</a> (a) Take the quiz (b) School news (c) art.html (d) href - 16.Which of these is an opening tag? (a) </h1> (b) </b> (c) </li> (d) <p>
- 17.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h5>? (a) <h6> (b) <h5> (c) <h2> (d) <h1>
- 18.Which of these is a closing tag? (a) </h1> (b) <li> (c) <p> (d) <h1>
- 19.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
-
20.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Banana</li>
</ul> -
21.🔗 Which words do you click on?
<a href="maths.html">About us</a> (a) Contact us (b) About us (c) maths.html (d) href -
22.🔗 Where does this link open?
<a href="news.html" target="_blank">Maths fun</a> (a) in the same tab (b) in a new tab - 23.Which of these is an opening tag? (a) </h1> (b) </body> (c) </title> (d) <h1>
- 24.Which of these is a closing tag? (a) <title> (b) </li> (c) <li> (d) <body>
-
25.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<p>I love mangoes.</p>
<!-- <p>My best friend</p> --> - 26.True or false: in <img>, height describes the picture. (a) False (b) True
-
27.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) kite.png (b) A tiger asleep (c) tiger.jpg (d) map.png - 28.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3/> (c) </h3> (d) <h3>
- 29.True or false: <img> has a closing tag. (a) True (b) False
- 30.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h1> or <h2>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
- 31.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h3>? (a) <h2> (b) <h4> (c) <h3> (d) <h1>
- 32.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
- 33.True or false: a code editor saves our .html files. (a) True (b) False
- 34.True or false: in <img>, width sets how wide it is. (a) True (b) False
- 35.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 36.True or false: a code editor is where we type code. (a) False (b) True
- 37.Which of these goes in the head? (a) <img> (b) <style> (c) <p> (d) <h1>
- 38.Which of these is true of a web server? (a) shows line numbers (b) saves our .html files (c) opens web pages for us (d) sends pages over the net
- 39.🔢 In a basic web page file, which comes LAST? (a) <html> (b) </html> (c) <body> (d) <!DOCTYPE html>
- 40.📄 Can HTML on its own count button clicks? (a) Yes (b) No
Answer key
- </title>
- opens it in a new tab
- <h4>
- 3
- 2
- element
- 3
- School news
- line 1
- No
- 3
- 3
- </h2>
- Rain today
- School news
- <p>
- <h1>
- </h1>
- <a>
- 2
- About us
- in a new tab
- <h1>
- </li>
- 2
- False
- tiger.jpg
- </h3>
- False
- <h6>
- <h1>
- False
- True
- True
- <ul>
- True
- <style>
- sends pages over the net
- </html>
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids