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: <style> goes in the body. (a) False (b) True
- 2.🌐 Which one hosts websites online? (a) a web browser (b) a web server (c) a code editor
- 3.True or false: <li> is one item of a list. (a) False (b) True
- 4.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
-
5.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) body (b) Easy snacks (c) Class 7 Blog (d) We won by 5 runs. - 6.Which of these is an opening tag? (a) </h1> (b) </p> (c) <title> (d) </li>
- 7.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
-
8.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Guava</li>
</ol> - 9.True or false: <ol> lists things in any order. (a) True (b) False
- 10.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
-
11.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>My best friend</p> -->
<p>The red kite</p> - 12.📋 Which list tag is one item of a list? (a) <ol> (b) <ul> (c) <li>
- 13.💬 Does the browser show comments on the page? (a) No (b) Yes
-
14.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="150"> (a) kite.png (b) An old fort (c) fort.jpg (d) tiger.jpg -
15.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>The red kite</p>
<h4>Cricket is fun.</h4>
<p>My pets</p> -
16.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) Maths fun (b) Visit the site (c) contact.html (d) href -
17.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab -
18.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="350"> - 19.True or false: <a> goes in the head. (a) False (b) True
- 20.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h3> or <h5>? (a) <h1> (b) <h6> (c) <h5> (d) <h3>
- 21.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h5> or <h2>? (a) <h1> (b) <h6> (c) <h5> (d) <h2>
- 22.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 23.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h6>? (a) <h6> (b) <h3> (c) <h2> (d) <h1>
- 24.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h1>? (a) <h1> (b) <h2> (c) <h6> (d) <h3>
-
25.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="350"> (a) map.png (b) kite.png (c) cake.jpg (d) A red kite - 26.Which of these is true of a web server? (a) turns HTML into a page (b) stores a website’s files (c) shows line numbers (d) shows pages from the web
- 27.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 28.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) { (d) [
- 29.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to colour it (d) to load it faster
-
30.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>My best friend</p>
<!-- <p>Rain today</p> --> (a) My best friend (b) Our school trip (c) Rain today - 31.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Language (d) Laptop
- 32.True or false: a code editor is where we type code. (a) False (b) True
-
33.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Litchi</li>
<li>Papaya</li>
<li>Orange</li>
</ol> - 34.Which of these is true of a web browser? (a) opens web pages for us (b) shows line numbers (c) answers page requests (d) stores a website’s files
- 35.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 36.True or false: a web browser opens web pages for us. (a) False (b) True
- 37.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small/> (c) <small> (d) </small>
- 38.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ul> (d) <ol>
- 39.True or false: a web server is where we type code. (a) True (b) False
- 40.True or false: <h1> goes in the body. (a) False (b) True
Answer key
- False
- a web server
- True
- in the body
- Easy snacks
- <title>
- opens it in a new tab
- 2
- False
- 6
- 1
- <li>
- No
- fort.jpg
- 2
- Visit the site
- in a new tab
- 350
- False
- <h1>
- <h6>
- has a closing tag
- <h1>
- <h1>
- kite.png
- stores a website’s files
- a closing tag
- <
- to describe the image
- Rain today
- Language
- True
- 4
- opens web pages for us
- Yes
- True
- </small>
- <li>
- False
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids