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 is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) <\strong> (d) </strong>
- 2.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 10 (d) 3
-
3.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Kites fly high<br>Sky is blue<br>Roses are red<br>Rivers flow</p> - 4.Which of these has a closing tag? (a) <hr> (b) <ul> (c) <br> (d) <input>
- 5.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
-
6.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers -
7.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>Rain today</p>
<!-- <p>Fun facts</p> -->
<p>Hello, world!</p> -
8.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>My pets</p>
<p>My pets</p>
<p>I love mangoes.</p> -
9.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) bus.jpg (b) dog.jpg (c) moon.png (d) A happy dog - 10.True or false: <hr> has a closing tag. (a) False (b) True
- 11.Which of these has a closing tag? (a) <meta> (b) <input> (c) <h1> (d) <img>
- 12.🏷️ Which is the closing tag for <p>? (a) <p> (b) </p> (c) <p/> (d) <\p>
-
13.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) about.html (b) Take the quiz (c) href (d) Play games -
14.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Guava</li>
<li>Banana</li>
<li>Grapes</li>
<li>Mango</li>
<li>Papaya</li>
</ul> - 15.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
- 16.True or false: <ol> is one item of a list. (a) True (b) False
- 17.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
- 18.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
-
19.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Rain today</p>
<h2>Cricket is fun.</h2>
<p>My pets</p> -
20.🔗 Which words do you click on?
<a href="quiz.html">Art corner</a> (a) School news (b) quiz.html (c) Art corner (d) href - 21.📄 Which part holds everything you see on the page? (a) the doctype (b) the head (c) the title (d) the body
- 22.True or false: <li> is one item of a list. (a) False (b) True
- 23.🔢 In a basic web page file, which comes first: “<head>” or “<body>”? (a) <head> (b) <body>
-
24.🔍 Which line is missing its closing tag?
line 1: <small>Rain today
line 2: <u>My pets</u>
line 3: <strong>My best friend</strong> (a) line 3 (b) line 2 (c) line 1 - 25.Which of these is true of a web server? (a) turns HTML into a page (b) hosts websites online (c) has an address bar (d) is where we type code
- 26.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <head> (c) <!DOCTYPE html> (d) </body>
- 27.True or false: in <img>, alt is read by screen readers. (a) False (b) True
-
28.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>Fun facts</h2>
<h2>Rain today</h2>
<h2>My best friend</h2> - 29.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as one space (c) as 5 spaces (d) as a dot
- 30.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) height (c) alt (d) src
- 31.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 32.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h1>? (a) <h3> (b) <h1> (c) <h5> (d) <h4>
-
33.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Fun facts</p> -->
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> --> - 34.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h3>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
- 35.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
36.🔍 One closing tag is missing. Which one?
<h3>Cricket is fun.
<p>Hello, world!</p>
<b>Good morning!</b> (a) </b> (b) </p> (c) </em> (d) </h3> -
37.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>My best friend</h2>
<p>Cricket is fun.</p>
<h2>I love mangoes.</h2>
<p>Hello, world!</p>
<p>I love mangoes.</p> - 38.True or false: <table> goes in the body. (a) True (b) False
- 39.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <br> (d) <p>
- 40.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h1>? (a) <h6> (b) <h5> (c) <h3> (d) <h1>
Answer key
- </strong>
- 6
- 5
- <ul>
- to leave notes
- numbers
- 3
- 4
- dog.jpg
- False
- <h1>
- </p>
- Take the quiz
- 6
- opens it in a new tab
- False
- a slash /
- in the body
- 3
- Art corner
- the body
- True
- <head>
- line 1
- hosts websites online
- <!DOCTYPE html>
- True
- 4
- as one space
- width
- has a closing tag
- <h1>
- 2
- <h6>
- has a closing tag
- </h3>
- 4
- True
- <h1>
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids