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 is true of a web browser? (a) answers page requests (b) turns HTML into a page (c) is where we type code (d) hosts websites online
- 2.True or false: <input> has a closing tag. (a) True (b) False
- 3.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to load it faster (d) to make it bigger
- 4.True or false: HTML on its own can pick a random number. (a) False (b) True
- 5.📄 Can HTML on its own make links to pages? (a) No (b) Yes
- 6.True or false: <table> goes in the body. (a) True (b) False
-
7.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Here is my best one.</p>
</body>
</html> (a) index.html (b) My drawings (c) Here is my best one. (d) Class 7 Blog - 8.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 3 (d) 10
- 9.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
- 10.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) width (c) src (d) height
-
11.🔗 Where does this link open?
<a href="news.html">Take the quiz</a> (a) in a new tab (b) in the same tab -
12.🔗 Which address opens when you click this link?
<a href="quiz.html">School news</a> (a) games.html (b) about.html (c) School news (d) quiz.html -
13.🔗 Which words do you click on?
<a href="about.html">Visit the site</a> (a) Visit the site (b) href (c) Maths fun (d) about.html - 14.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a slash / (d) a hash #
- 15.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i/> (c) <i> (d) </i>
-
16.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>The red kite</p> -->
<!-- <p>Rain today</p> --> - 17.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 18.📝 What does <p> make? (a) a picture (b) a paragraph (c) a link (d) a table
- 19.True or false: <p> goes in the body. (a) False (b) True
- 20.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
- 21.True or false: in <img>, width names the picture file. (a) True (b) False
- 22.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 23.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
-
24.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>Good morning!</p>
<h2>Good morning!</h2> -
25.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<p>Hello, world!</p>
<!-- <p>My best friend</p> --> (a) I love mangoes. (b) Hello, world! (c) My pets (d) My best friend - 26.Which of these is an opening tag? (a) <li> (b) </body> (c) </b> (d) </h1>
-
27.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p> - 28.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
- 29.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <ul> (d) <li>
-
30.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Litchi</li>
</ul> - 31.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
-
32.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Good morning!</p>
<p>Fun facts</p>
<p>The red kite</p> - 33.Which of these is an opening tag? (a) </h1> (b) </b> (c) </p> (d) <title>
-
34.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>Good morning!</h4>
<h3>Our school trip</h3>
<p>Rain today</p>
<p>My pets</p> - 35.True or false: a web server shows pages from the web. (a) True (b) False
-
36.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Good morning!</p> -->
<p>My best friend</p> -
37.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p>
<p>Fun facts</p> (a) Hello, world! (b) Our school trip (c) Fun facts - 38.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
-
39.🔗 Where does this link open?
<a href="art.html">Play games</a> (a) in a new tab (b) in the same tab -
40.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Jamun</li>
<li>Banana</li>
</ol> (a) numbers (b) bullets
Answer key
- turns HTML into a page
- False
- to describe the image
- False
- Yes
- True
- Class 7 Blog
- 6
- -->
- alt
- in the same tab
- quiz.html
- Visit the site
- a slash /
- </i>
- 1
- a closing tag
- a paragraph
- True
- <ol>
- False
- Yes
- <!DOCTYPE html>
- 2
- My best friend
- <li>
- 1
- on the browser tab
- <li>
- 2
- <img>
- 4
- <title>
- 3
- False
- 1
- Our school trip
- a web server
- in the same tab
- numbers
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids