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.True or false: a web browser shows line numbers. (a) False (b) True
- 2.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
- 3.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
- 4.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the doctype (d) the head
- 5.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
-
6.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Stars shine<br>Rivers flow</p> -
7.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p>
<p>Cricket is fun.</p> (a) My pets (b) Cricket is fun. (c) Hello, world! (d) Our school trip -
8.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) Play games (b) https://example.com (c) maths.html (d) contact.html -
9.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="150"> (a) moon.png (b) bus.jpg (c) fort.jpg (d) The full moon -
10.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>Rain today</p> -->
<p>My pets</p>
<!-- <p>The red kite</p> --> - 11.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
-
12.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>My pets</p>
<h2>My best friend</h2>
<h2>Fun facts</h2>
<p>The red kite</p>
<p>My pets</p> - 13.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 14.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) height (c) alt (d) src
- 15.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
- 16.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
17.🔍 One closing tag is missing. Which one?
<h1>The red kite
<h3>Rain today</h3>
<b>Cricket is fun.</b> (a) </h3> (b) </h1> (c) </b> (d) </strong> -
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) width (b) dog.jpg (c) The full moon (d) A happy dog -
19.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h4>Cricket is fun.</h4>
<p>The red kite</p>
<h2>Good morning!</h2>
<p>Rain today</p> - 20.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
21.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="100"> -
22.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) About us (b) Play games (c) games.html (d) href - 23.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
- 24.🌐 Which one is where we type code? (a) a web server (b) a code editor (c) a web browser
- 25.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h3> (d) <h6>
-
26.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing<br>Kites fly high</p> -
27.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) href (b) contact.html (c) About us (d) Contact us - 28.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
29.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<!-- <p>Good morning!</p> -->
<p>Fun facts</p> -
30.🔍 One closing tag is missing. Which one?
<h2>Good morning!</h2>
<p>My pets
<h1>My best friend</h1> (a) </p> (b) </h1> (c) </h2> (d) </small> -
31.🔗 Which words do you click on?
<a href="contact.html">Contact us</a> (a) Contact us (b) contact.html (c) href (d) Visit the site - 32.Which of these goes in the head? (a) <a> (b) <ul> (c) <h1> (d) <style>
- 33.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
- 34.True or false: a web browser hosts websites online. (a) False (b) True
-
35.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="100"> (a) A red kite (b) width (c) kite.png (d) Map of India - 36.Which of these is an opening tag? (a) </body> (b) </li> (c) <h1> (d) </b>
-
37.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="150"> - 38.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h2>? (a) <h1> (b) <h2> (c) <h5> (d) <h6>
- 39.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
-
40.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>The red kite</h2>
<p>I love mangoes.</p>
<p>Rain today</p>
Answer key
- False
- Yes
- <
- the body
- <ol>
- 3
- Hello, world!
- contact.html
- moon.png
- 3
- <!--
- 4
- a closing tag
- alt
- False
- a closing tag
- </h1>
- A happy dog
- 3
- Yes
- 100
- Play games
- <a href="about.html">
- a code editor
- <h6>
- 3
- About us
- Yes
- 2
- </p>
- Contact us
- <style>
- <a>
- False
- A red kite
- <h1>
- 150
- <h6>
- opens it in a new tab
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids