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 of these goes in the head? (a) <h1> (b) <img> (c) <a> (d) <title>
- 2.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Mouse (c) Machine (d) Modern
- 3.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) ( (d) <
- 4.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i/> (c) <i> (d) </i>
-
5.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p> (a) Cricket is fun. (b) My pets (c) Our school trip - 6.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
- 7.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h3>? (a) <h6> (b) <h1> (c) <h5> (d) <h3>
- 8.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 9.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) High Tech (d) HyperText
- 10.Which of these is an opening tag? (a) </title> (b) <b> (c) </li> (d) </p>
- 11.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h4> or <h2>? (a) <h2> (b) <h3> (c) <h6> (d) <h4>
- 12.True or false: <img> has a closing tag. (a) True (b) False
-
13.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Fun facts</p>
<p>Our school trip</p> - 14.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 15.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .txt (d) .html
- 16.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a href="about.html"> (d) <a alt="about.html">
- 17.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a table (d) a picture
-
18.🔍 Which line is missing its closing tag?
line 1: <i>I love mangoes.</i>
line 2: <u>Hello, world!
line 3: <strong>Cricket is fun.</strong> (a) line 1 (b) line 2 (c) line 3 - 19.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
-
20.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>Good morning!</p> -->
<p>My best friend</p> - 21.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ul> (d) <ol>
- 22.Which of these goes in the head? (a) <ul> (b) <a> (c) <meta charset="utf-8"> (d) <p>
-
23.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Our school trip</h2>
<p>Good morning!</p>
<p>Rain today</p>
<p>Rain today</p> - 24.🔢 In a basic web page file, which comes first: “</html>” or “<head>”? (a) <head> (b) </html>
-
25.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) Play games (b) href (c) about.html (d) Take the quiz - 26.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
-
27.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Rain today</p>
<p>The red kite</p> (a) The red kite (b) My pets (c) Rain today - 28.True or false: a web browser hosts websites online. (a) True (b) False
- 29.True or false: in <img>, height sets how tall it is. (a) False (b) True
- 30.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 31.🏷️ Which is the closing tag for <u>? (a) <u/> (b) </u> (c) <u> (d) <\u>
- 32.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 33.True or false: a web browser saves our .html files. (a) True (b) False
- 34.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <ul> (d) <p>
-
35.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue</p> - 36.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 37.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h6> (d) <h3>
- 38.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h6> or <h2>? (a) <h1> (b) <h6> (c) <h3> (d) <h2>
- 39.Which of these goes in the head? (a) <h1> (b) <link rel="stylesheet"> (c) <p> (d) <img>
-
40.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Planets</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) Art Gallery (c) Planets (d) index.html
Answer key
- <title>
- Markup
- <
- </i>
- Our school trip
- href
- <h1>
- True
- HyperText
- <b>
- <h2>
- False
- 2
- in the body
- .html
- <a href="about.html">
- a line across the page
- line 2
- a code editor
- 1
- <ol>
- <meta charset="utf-8">
- 4
- <head>
- Take the quiz
- <a>
- My pets
- False
- True
- Yes
- </u>
- in the body
- False
- <li>
- 2
- in the head
- <h6>
- <h6>
- <link rel="stylesheet">
- Art Gallery
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids