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 text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Rain today</p>
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Rain today (c) My pets - 2.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) opens it in a new tab (d) makes it bold
- 3.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
- 4.📝 What does <br> do? (a) adds a picture (b) starts a new line (c) makes a list (d) makes text bold
- 5.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>
- 6.Which of these is an opening tag? (a) </p> (b) <title> (c) </li> (d) </b>
- 7.Which of these has a closing tag? (a) <hr> (b) <input> (c) <br> (d) <p>
- 8.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
-
9.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Kites fly high<br>Sky is blue<br>Birds sing</p> -
10.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Good morning!</p>
<h3>My best friend</h3>
<h3>Rain today</h3>
<p>The red kite</p> - 11.🔤 In “HTML”, what does the L stand for? (a) Language (b) Line (c) Laptop (d) Link
- 12.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
- 13.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) height (d) alt
- 14.🌐 Which one stores a website’s files? (a) a web server (b) a code editor (c) a web browser
- 15.True or false: in <img>, alt shows if the image fails. (a) True (b) False
-
16.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) maths.html (b) href (c) Play games (d) Take the quiz - 17.True or false: <table> goes in the head. (a) False (b) True
-
18.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>The red kite</p>
<h2>Fun facts</h2>
<h4>Fun facts</h4> -
19.🔍 One closing tag is missing. Which one?
<b>Hello, world!
<h2>I love mangoes.</h2>
<em>The red kite</em> (a) </em> (b) </p> (c) </b> (d) </h2> -
20.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Banana</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Grapes</li>
<li>Guava</li>
</ul> -
21.🔍 One closing tag is missing. Which one?
<p>Fun facts</p>
<em>I love mangoes.</em>
<h2>Rain today (a) </p> (b) </em> (c) </u> (d) </h2> -
22.🔍 Which line is missing its closing tag?
line 1: <h1>Our school trip</h1>
line 2: <h2>Fun facts</h2>
line 3: <h3>I love mangoes. (a) line 3 (b) line 2 (c) line 1 - 23.True or false: <ul> goes in the head. (a) True (b) False
-
24.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) width (b) dog.jpg (c) A happy dog (d) The full moon - 25.True or false: a code editor has an address bar. (a) True (b) False
- 26.True or false: HTML on its own cannot run a game loop. (a) True (b) False
-
27.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h4>I love mangoes.</h4>
<h2>Rain today</h2>
<h2>Hello, world!</h2>
<p>The red kite</p> -
28.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) cake.jpg (b) A happy dog (c) Birthday cake (d) width - 29.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 30.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 31.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 32.🔍 Which is the odd one out? (a) hosts websites online (b) has an address bar (c) answers page requests (d) stores a website’s files
-
33.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>Good morning!</h2>
<p>Cricket is fun.</p>
<p>Our school trip</p>
<h2>The red kite</h2>
<p>My best friend</p> - 34.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
- 35.True or false: in <img>, src sets how wide it is. (a) True (b) False
- 36.💬 How does an HTML comment end? (a) >> (b) */ (c) --> (d) //
-
37.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> - 38.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
39.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Hello, world!</p>
<p>I love mangoes.</p> - 40.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h1> (c) <br> (d) <h6>
Answer key
- My pets
- opens it in a new tab
- Yes
- starts a new line
- <a href="about.html">
- <title>
- <p>
- <ul>
- 5
- 3
- Language
- <h1>
- alt
- a web server
- True
- Take the quiz
- False
- 3
- </b>
- 6
- </h2>
- line 3
- False
- A happy dog
- False
- True
- 4
- Birthday cake
- Yes
- an opening tag
- has a closing tag
- has an address bar
- 4
- <ol>
- False
- -->
- 200
- Yes
- 2
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids