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>, height describes the picture. (a) True (b) False
- 2.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to show pictures (d) to make links
- 3.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
- 4.True or false: a web server colours code to help us. (a) True (b) False
- 5.True or false: <li> lists things in any order. (a) True (b) False
- 6.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
7.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>The red kite</p> -
8.🔗 Where does this link open?
<a href="news.html">Maths fun</a> (a) in the same tab (b) in a new tab -
9.🔍 One closing tag is missing. Which one?
<u>Fun facts
<h2>Good morning!</h2>
<small>Cricket is fun.</small> (a) </small> (b) </u> (c) </p> (d) </h2> -
10.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) tiger.jpg (b) fort.jpg (c) bus.jpg (d) Our school bus - 11.True or false: <ul> is an unordered list. (a) True (b) False
- 12.True or false: in <img>, alt names the picture file. (a) False (b) True
-
13.🔍 One closing tag is missing. Which one?
<strong>Our school trip
<h1>My pets</h1>
<em>Rain today</em> (a) </b> (b) </em> (c) </strong> (d) </h1> -
14.🔗 Which address opens when you click this link?
<a href="art.html">Art corner</a> (a) Art corner (b) quiz.html (c) art.html (d) news.html - 15.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h1>? (a) <h4> (b) <h6> (c) <h2> (d) <h1>
- 16.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
- 17.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 18.Which of these is an opening tag? (a) </title> (b) </li> (c) <b> (d) </b>
-
19.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) dog.jpg (b) A happy dog (c) moon.png (d) bus.jpg - 20.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
21.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="350"> - 22.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 23.True or false: in <img>, height names the picture file. (a) False (b) True
- 24.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
- 25.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) alt (d) src
-
26.🔗 Where does this link open?
<a href="maths.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab - 27.🔍 Which is the odd one out? (a) colours code to help us (b) hosts websites online (c) sends pages over the net (d) answers page requests
-
28.🔗 Which address opens when you click this link?
<a href="contact.html">Art corner</a> (a) https://example.com (b) Art corner (c) contact.html (d) maths.html -
29.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Banana</li>
<li>Litchi</li>
</ol> (a) bullets (b) numbers - 30.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
- 31.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a dot . (d) a hash #
- 32.🌐 Which one stores a website’s files? (a) a code editor (b) a web browser (c) a web server
- 33.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h3>? (a) <h5> (b) <h1> (c) <h2> (d) <h3>
-
34.🔗 Which address opens when you click this link?
<a href="maths.html">About us</a> (a) maths.html (b) art.html (c) news.html (d) About us - 35.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
-
36.🔍 One closing tag is missing. Which one?
<u>My pets</u>
<small>I love mangoes.
<p>Good morning!</p> (a) </h2> (b) </p> (c) </small> (d) </u> - 37.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
-
38.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<p>Rain today</p> (a) Rain today (b) Hello, world! (c) I love mangoes. - 39.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h3>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
- 40.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <\h1> (c) <h1> (d) </h1>
Answer key
- False
- to leave notes
- in the body
- False
- False
- Yes
- 6
- in the same tab
- </u>
- bus.jpg
- True
- False
- </strong>
- art.html
- <h6>
- a web browser
- No
- <b>
- dog.jpg
- an empty tag
- 350
- an empty tag
- False
- <ul>
- src
- in a new tab
- colours code to help us
- contact.html
- numbers
- a web browser
- a slash /
- a web server
- <h5>
- maths.html
- Yes
- </small>
- <img>
- Hello, world!
- <h1>
- </h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids