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 picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) bus.jpg (b) tiger.jpg (c) Our school bus (d) fort.jpg -
2.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>My pets</p> -->
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>Rain today</p> -
3.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) games.html (b) Visit the site (c) Contact us (d) href - 4.True or false: <p> has a closing tag. (a) True (b) False
-
5.🔍 One closing tag is missing. Which one?
<h3>My pets
<em>The red kite</em>
<h1>Our school trip</h1> (a) </h3> (b) </h1> (c) </u> (d) </em> - 6.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
- 7.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
- 8.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) src (d) alt
- 9.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 10.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
- 11.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
- 12.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Markup (c) Machine (d) Mouse
-
13.🔗 Which words do you click on?
<a href="art.html">Contact us</a> (a) Contact us (b) Visit the site (c) href (d) art.html - 14.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
- 15.Which of these has a closing tag? (a) <hr> (b) <br> (c) <input> (d) <ul>
-
16.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Mango</li>
<li>Guava</li>
<li>Jamun</li>
</ol> - 17.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) { (d) <
- 18.Which of these is a closing tag? (a) <h1> (b) <body> (c) <p> (d) </p>
- 19.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
- 20.True or false: HTML on its own can run a game loop. (a) False (b) True
-
21.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Fun facts</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Rain today</p> -->
<p>My pets</p> -
22.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) My drawings (b) Try this poha. (c) body (d) Space Facts - 23.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 24.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Home Text (c) HyperText (d) Hot Tags
-
25.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Planets</h1>
<p>Try this poha.</p>
</body>
</html> (a) body (b) Riya’s Recipes (c) Try this poha. (d) Planets - 26.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
- 27.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) <strong> (c) <\strong> (d) </strong>
- 28.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
- 29.True or false: in <img>, alt describes the picture. (a) False (b) True
- 30.💬 Does the browser show comments on the page? (a) No (b) Yes
-
31.🔗 Where does this link open?
<a href="about.html">Take the quiz</a> (a) in a new tab (b) in the same tab -
32.🔗 Which words do you click on?
<a href="news.html">About us</a> (a) About us (b) news.html (c) Contact us (d) href - 33.True or false: <meta> has a closing tag. (a) True (b) False
-
34.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Our school trip</p>
<!-- <p>My best friend</p> --> (a) My best friend (b) Cricket is fun. (c) Our school trip -
35.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) My Hobbies (b) All about me (c) index.html (d) Thanks for visiting. - 36.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
-
37.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<!-- <p>My pets</p> --> (a) I love mangoes. (b) Cricket is fun. (c) My pets -
38.🔍 Which line is missing its closing tag?
line 1: <h2>My best friend</h2>
line 2: <em>My pets</em>
line 3: <h3>Good morning! (a) line 3 (b) line 2 (c) line 1 - 39.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) src (c) width (d) height
-
40.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>My best friend</h2>
<h2>The red kite</h2>
<p>Rain today</p>
<p>Rain today</p>
Answer key
- bus.jpg
- 3
- Contact us
- True
- </h3>
- <!DOCTYPE html>
- a web server
- src
- has a closing tag
- <a href="about.html">
- False
- Markup
- Contact us
- <li>
- <ul>
- 3
- <
- </p>
- -->
- False
- 2
- My drawings
- in the head
- HyperText
- Planets
- in the body
- </strong>
- <ol>
- True
- No
- in the same tab
- About us
- False
- My best friend
- My Hobbies
- a web browser
- My pets
- line 3
- height
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids