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.🔍 One closing tag is missing. Which one?
<h3>My best friend</h3>
<h2>I love mangoes.</h2>
<em>My pets (a) </u> (b) </em> (c) </h3> (d) </h2> - 2.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
- 3.📝 What does <p> make? (a) a link (b) a paragraph (c) a picture (d) a table
-
4.🔗 Which words do you click on?
<a href="games.html">About us</a> (a) games.html (b) Contact us (c) href (d) About us - 5.📄 Which part holds everything you see on the page? (a) the doctype (b) the head (c) the body (d) the title
- 6.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
- 7.🏷️ Which is the closing tag for <b>? (a) <b> (b) </b> (c) <\b> (d) <b/>
-
8.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) https://example.com (b) Play games (c) href (d) About us -
9.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Litchi</li>
<li>Mango</li>
</ol> (a) bullets (b) numbers - 10.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) src (d) alt
- 11.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
12.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) body (b) Space Facts (c) Match report (d) I like to read. -
13.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Banana</li>
<li>Grapes</li>
<li>Papaya</li>
</ul> - 14.True or false: a web browser turns HTML into a page. (a) False (b) True
-
15.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Rain today</p>
<p>Cricket is fun.</p>
<p>My pets</p>
<h2>Rain today</h2> - 16.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
- 17.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a hash # (c) a dot . (d) a dollar $
- 18.📝 What does <hr> draw? (a) a picture (b) a link (c) a table (d) a line across the page
- 19.True or false: <ul> goes inside ul or ol. (a) True (b) False
- 20.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 21.True or false: <ul> shows bullet points. (a) False (b) True
-
22.🔗 Where does this link open?
<a href="art.html" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab - 23.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) </head> (b) <html>
- 24.True or false: a web server shows pages from the web. (a) False (b) True
- 25.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 26.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 27.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
- 28.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h1> or <h5>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
- 29.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h1> (d) <h6>
-
30.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Good morning!</p>
<!-- <p>Our school trip</p> --> (a) Good morning! (b) Our school trip (c) My best friend - 31.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
-
32.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) cake.jpg (b) Birthday cake (c) moon.png (d) dog.jpg - 33.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h4> or <h6>? (a) <h4> (b) <h2> (c) <h1> (d) <h6>
- 34.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
- 35.True or false: <ul> is an empty tag. (a) False (b) True
- 36.Which of these is true of a code editor? (a) sends pages over the net (b) stores a website’s files (c) turns HTML into a page (d) saves our .html files
- 37.💬 Does the browser show comments on the page? (a) No (b) Yes
- 38.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
39.🔗 Which address opens when you click this link?
<a href="about.html">School news</a> (a) https://example.com (b) about.html (c) School news (d) contact.html -
40.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Rain today</p>
<h2>Hello, world!</h2>
<h2>I love mangoes.</h2>
Answer key
- </em>
- height
- a paragraph
- About us
- the body
- an attribute
- </b>
- Play games
- numbers
- src
- an empty tag
- Match report
- 4
- True
- 4
- False
- a slash /
- a line across the page
- False
- a closing tag
- True
- in a new tab
- <html>
- False
- No
- an opening tag
- on the browser tab
- <h1>
- <h6>
- Our school trip
- <li>
- cake.jpg
- <h6>
- <li>
- False
- saves our .html files
- No
- an opening tag
- about.html
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids