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.True or false: in <img>, src sets how tall it is. (a) False (b) True
- 2.🔍 Which is the odd one out? (a) turns HTML into a page (b) stores a website’s files (c) opens web pages for us (d) shows pages from the web
- 3.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <\h2> (d) <h2>
- 4.Which of these has a closing tag? (a) <b> (b) <img> (c) <input> (d) <meta>
-
5.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>The red kite</p> -->
<p>Hello, world!</p> -
6.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>My pets</p>
<!-- <p>Our school trip</p> --> (a) Fun facts (b) Our school trip (c) My pets - 7.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <p> (d) <a>
- 8.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) <head>
- 9.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) High Tech (c) HyperText (d) Hot Tags
- 10.💬 Does the browser show comments on the page? (a) No (b) Yes
-
11.🔗 Which words do you click on?
<a href="contact.html">Contact us</a> (a) Contact us (b) contact.html (c) href (d) Visit the site - 12.True or false: <ul> goes in the head. (a) False (b) True
- 13.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
- 14.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <!DOCTYPE html> (c) </head> (d) <html>
- 15.🔍 Which is the odd one out? (a) turns HTML into a page (b) saves our .html files (c) colours code to help us (d) shows line numbers
- 16.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <style> (d) <a>
- 17.Which of these goes in the head? (a) <title> (b) <ul> (c) <h1> (d) <p>
-
18.🔗 Where does this link open?
<a href="art.html">Contact us</a> (a) in a new tab (b) in the same tab - 19.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
20.🔗 Which words do you click on?
<a href="art.html">About us</a> (a) About us (b) Contact us (c) art.html (d) href -
21.🔗 Which words do you click on?
<a href="https://example.com">Contact us</a> (a) Visit the site (b) href (c) https://example.com (d) Contact us -
22.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="250"> (a) A red kite (b) cake.jpg (c) kite.png (d) map.png - 23.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 24.Which of these is true of a web browser? (a) sends pages over the net (b) opens web pages for us (c) shows line numbers (d) answers page requests
- 25.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h3>? (a) <h4> (b) <h2> (c) <h3> (d) <h5>
- 26.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
- 27.📝 What does <p> make? (a) a picture (b) a table (c) a paragraph (d) a link
- 28.Which of these goes in the head? (a) <a> (b) <meta charset="utf-8"> (c) <ul> (d) <h1>
- 29.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
- 30.True or false: in <img>, alt sets how tall it is. (a) False (b) True
- 31.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
- 32.True or false: in <img>, src tells which image to load. (a) False (b) True
-
33.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="350"> (a) tiger.jpg (b) An old fort (c) fort.jpg (d) kite.png - 34.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) href (d) id
- 35.📄 Where does the text of <title> appear? (a) on the browser tab (b) in a big heading (c) at the bottom (d) nowhere
-
36.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) Planets (c) I like to read. (d) Class 7 Blog -
37.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Our school trip</p> -->
<p>My best friend</p> -
38.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<p>Good morning!</p>
<!-- <p>Our school trip</p> --> (a) Our school trip (b) Cricket is fun. (c) Good morning! (d) Fun facts -
39.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red</p> - 40.True or false: a web browser hosts websites online. (a) False (b) True
Answer key
- False
- stores a website’s files
- </h2>
- <b>
- 2
- Our school trip
- <img>
- <!DOCTYPE html>
- HyperText
- No
- Contact us
- False
- in the body
- <!DOCTYPE html>
- turns HTML into a page
- <a>
- <title>
- in the same tab
- a closing tag
- About us
- Contact us
- kite.png
- an opening tag
- opens web pages for us
- <h2>
- <h6>
- a paragraph
- <meta charset="utf-8">
- a web browser
- False
- <a href="about.html">
- True
- fort.jpg
- href
- on the browser tab
- Class 7 Blog
- 1
- Our school trip
- 2
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids