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.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
2.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Papaya</li>
</ul> - 3.🔗 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
-
4.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>I love mangoes.</p> -->
<p>My pets</p> -
5.🔗 Where does this link open?
<a href="news.html">About us</a> (a) in the same tab (b) in a new tab - 6.True or false: <li> has a closing tag. (a) False (b) True
- 7.True or false: <li> is an empty tag. (a) True (b) False
-
8.🔗 Where does this link open?
<a href="quiz.html">Take the quiz</a> (a) in the same tab (b) in a new tab - 9.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
- 10.🔢 In a basic web page file, which comes first: “<head>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) <head>
-
11.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>I love mangoes.</p>
<h3>Hello, world!</h3> -
12.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>Fun facts</p> --> - 13.🖼️ Which attribute of <img> tells which image to load? (a) width (b) src (c) height (d) alt
- 14.True or false: in <img>, height sets how tall it is. (a) True (b) False
-
15.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Good morning!</p>
<p>Hello, world!</p>
<h4>Good morning!</h4>
<h3>My pets</h3> - 16.🏷️ Which is the closing tag for <u>? (a) <u/> (b) <\u> (c) <u> (d) </u>
- 17.Which of these goes in the head? (a) <h1> (b) <ul> (c) <meta charset="utf-8"> (d) <table>
- 18.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b> (c) <b/> (d) <\b>
- 19.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
- 20.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
- 21.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
- 22.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
- 23.🌍 Which program shows a web page to us? (a) a calculator (b) a paint program (c) a web browser (d) a music player
- 24.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h4>? (a) <h6> (b) <h1> (c) <h4> (d) <h5>
-
25.🔗 Where does this link open?
<a href="contact.html">Take the quiz</a> (a) in a new tab (b) in the same tab -
26.🔗 Which address opens when you click this link?
<a href="art.html">School news</a> (a) art.html (b) School news (c) news.html (d) quiz.html - 27.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
-
28.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>Rain today</h2>
<h2>Good morning!</h2>
<p>My best friend</p>
<p>Hello, world!</p>
<p>Good morning!</p> - 29.🌐 Which one colours code to help us? (a) a web server (b) a web browser (c) a code editor
- 30.📝 What does <p> make? (a) a link (b) a paragraph (c) a picture (d) a table
-
31.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>My best friend</p>
<p>Good morning!</p>
<p>Our school trip</p>
<p>Cricket is fun.</p> - 32.True or false: in <img>, width sets how wide it is. (a) False (b) True
- 33.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
-
34.🔍 Which line is missing its closing tag?
line 1: <em>My pets</em>
line 2: <u>Good morning!</u>
line 3: <h3>The red kite (a) line 1 (b) line 3 (c) line 2 - 35.Which of these has a closing tag? (a) <p> (b) <img> (c) <br> (d) <hr>
- 36.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
37.🔗 Which address opens when you click this link?
<a href="news.html">Play games</a> (a) quiz.html (b) games.html (c) Play games (d) news.html - 38.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
- 39.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <\h2> (d) <h2>
- 40.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h2> or <h1>? (a) <h1> (b) <h5> (c) <h3> (d) <h2>
Answer key
- Yes
- 2
- opens it in a new tab
- 1
- in the same tab
- True
- False
- in the same tab
- a web browser
- <!DOCTYPE html>
- 2
- 1
- src
- True
- 3
- </u>
- <meta charset="utf-8">
- </b>
- the body
- a web browser
- on the browser tab
- <ol>
- a web browser
- <h1>
- in the same tab
- art.html
- <a>
- 4
- a code editor
- a paragraph
- 1
- True
- -->
- line 3
- <p>
- has a closing tag
- news.html
- <h1>
- </h2>
- <h5>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids