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.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Our school trip</p>
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> --> - 2.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
- 3.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
4.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red</p> - 5.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
- 6.🔍 Which is the odd one out? (a) stores a website’s files (b) is where we type code (c) answers page requests (d) sends pages over the net
- 7.True or false: in <img>, height tells which image to load. (a) False (b) True
- 8.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
-
9.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Guava</li>
</ol> -
10.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="400"> - 11.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 12.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
13.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Fun facts</p>
<h3>I love mangoes.</h3> - 14.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h4> or <h5>? (a) <h6> (b) <h1> (c) <h5> (d) <h4>
- 15.True or false: in <img>, alt sets how wide it is. (a) False (b) True
- 16.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
-
17.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>My pets</p> -->
<p>Hello, world!</p>
<p>Good morning!</p> - 18.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <ul> (c) <h1> (d) <p>
-
19.🔍 Which line is missing its closing tag?
line 1: <h1>I love mangoes.</h1>
line 2: <h2>Good morning!
line 3: <u>Cricket is fun.</u> (a) line 1 (b) line 2 (c) line 3 - 20.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
21.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>My pets</p>
<!-- <p>Good morning!</p> --> (a) Good morning! (b) Fun facts (c) My pets - 22.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 23.🔗 What does HyperText mean? (a) text in colour (b) text with links (c) secret text (d) very big text
- 24.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Markup (c) Modern (d) Mouse
-
25.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Rain today</h2>
<p>Fun facts</p>
<h2>Hello, world!</h2>
<p>The red kite</p>
<p>My pets</p> -
26.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Grapes</li>
</ul> (a) numbers (b) bullets -
27.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="350"> (a) An old fort (b) width (c) Our school bus (d) bus.jpg - 28.True or false: <ul> is an unordered list. (a) True (b) False
- 29.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h5>? (a) <h4> (b) <h6> (c) <h5> (d) <h2>
-
30.🔍 One closing tag is missing. Which one?
<h3>Our school trip</h3>
<h1>I love mangoes.</h1>
<strong>Rain today (a) </strong> (b) </h3> (c) </h1> (d) </p> - 31.Which of these is true of a web browser? (a) sends pages over the net (b) hosts websites online (c) shows pages from the web (d) stores a website’s files
-
32.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>My pets</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Rain today</p> --> -
33.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>Our school trip</h3>
<h2>Fun facts</h2> - 34.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h4>? (a) <h5> (b) <h3> (c) <h1> (d) <h4>
-
35.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Planets</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) My Hobbies (c) index.html (d) Planets - 36.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 37.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h1> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h4>
- 38.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
-
39.🔗 Which address opens when you click this link?
<a href="art.html">School news</a> (a) School news (b) quiz.html (c) art.html (d) news.html - 40.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
Answer key
- 3
- a line across the page
- in the head
- 2
- a code editor
- is where we type code
- False
- in the head
- 2
- 400
- a closing tag
- Yes
- 2
- <h1>
- False
- an attribute
- 3
- <link rel="stylesheet">
- line 2
- an empty tag
- Good morning!
- No
- text with links
- Markup
- 4
- bullets
- Our school bus
- True
- <h6>
- </strong>
- shows pages from the web
- 1
- 3
- <h5>
- My Hobbies
- an opening tag
- <h6>
- in the head
- art.html
- <a>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids