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: <p> has a closing tag. (a) True (b) False
- 2.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 3.True or false: <ul> goes inside ul or ol. (a) False (b) True
- 4.🌐 Which one is where we type code? (a) a web browser (b) a code editor (c) a web server
-
5.🔍 Which line is missing its closing tag?
line 1: <h3>My best friend</h3>
line 2: <em>Cricket is fun.
line 3: <b>Rain today</b> (a) line 1 (b) line 2 (c) line 3 -
6.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<!-- <p>Our school trip</p> -->
<p>My best friend</p> - 7.True or false: a code editor opens web pages for us. (a) True (b) False
- 8.Which of these is a closing tag? (a) <body> (b) <h1> (c) </p> (d) <li>
- 9.🌐 Which one hosts websites online? (a) a code editor (b) a web browser (c) a web server
-
10.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Rain today</p>
<!-- <p>I love mangoes.</p> --> (a) My best friend (b) Rain today (c) I love mangoes. - 11.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to add colour (d) to show pictures
-
12.🔍 Which line is missing its closing tag?
line 1: <b>Fun facts
line 2: <h1>The red kite</h1>
line 3: <strong>Cricket is fun.</strong> (a) line 1 (b) line 3 (c) line 2 -
13.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Guava</li>
<li>Grapes</li>
</ol> (a) bullets (b) numbers - 14.🔍 Which is the odd one out? (a) shows pages from the web (b) turns HTML into a page (c) has an address bar (d) saves our .html files
-
15.🔗 Where does this link open?
<a href="about.html" target="_blank">Maths fun</a> (a) in a new tab (b) in the same tab -
16.🔗 Which address opens when you click this link?
<a href="games.html">Maths fun</a> (a) contact.html (b) about.html (c) games.html (d) Maths fun - 17.🔗 What does HyperText mean? (a) text with links (b) very big text (c) secret text (d) text in colour
- 18.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) Home Text (c) HyperText (d) High Tech
- 19.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
- 20.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
- 21.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h6> or <h2>? (a) <h1> (b) <h6> (c) <h5> (d) <h2>
-
22.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Birds sing</p> - 23.True or false: a code editor sends pages over the net. (a) False (b) True
- 24.📝 What do we need to write HTML? (a) a printer (b) a paintbrush (c) a microphone (d) a plain text editor
- 25.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 26.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h4> or <h2>? (a) <h3> (b) <h6> (c) <h4> (d) <h2>
-
27.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) All about me (b) Cricket Club (c) Mars is red. (d) body - 28.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) height (c) width (d) src
-
29.🔗 Which words do you click on?
<a href="about.html">Play games</a> (a) About us (b) about.html (c) Play games (d) href - 30.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) height (d) alt
- 31.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h6>? (a) <h2> (b) <h3> (c) <h4> (d) <h6>
- 32.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h1>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
-
33.🔍 Which line is missing its closing tag?
line 1: <p>Cricket is fun.</p>
line 2: <small>Our school trip
line 3: <i>Rain today</i> (a) line 2 (b) line 1 (c) line 3 - 34.🔢 In a basic web page file, which comes first: “</body>” or “</html>”? (a) </html> (b) </body>
-
35.🔍 One closing tag is missing. Which one?
<h3>Rain today</h3>
<u>Our school trip</u>
<strong>Hello, world! (a) </u> (b) </h3> (c) </h1> (d) </strong> - 36.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <head> (b) <!DOCTYPE html>
- 37.📄 Can HTML on its own keep a high score? (a) Yes (b) No
-
38.🔍 Which line is missing its closing tag?
line 1: <em>Cricket is fun.</em>
line 2: <strong>Rain today</strong>
line 3: <u>I love mangoes. (a) line 2 (b) line 1 (c) line 3 - 39.True or false: HTML on its own can make links to pages. (a) False (b) True
- 40.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
Answer key
- True
- Yes
- False
- a code editor
- line 2
- 3
- False
- </p>
- a web server
- I love mangoes.
- to leave notes
- line 1
- numbers
- saves our .html files
- in a new tab
- games.html
- text with links
- HyperText
- on the browser tab
- <ol>
- <h1>
- 2
- False
- a plain text editor
- has a closing tag
- <h2>
- All about me
- height
- Play games
- alt
- <h2>
- <h4>
- line 2
- </body>
- </strong>
- <!DOCTYPE html>
- No
- line 3
- True
- -->
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids