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.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) makes it blank (d) opens it in a new tab
- 2.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <body> (b) <!DOCTYPE html>
- 3.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <ul> (d) <p>
- 4.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h6> (d) <h3>
-
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) width (b) cake.jpg (c) A happy dog (d) Birthday cake - 6.Which of these is true of a web browser? (a) saves our .html files (b) is where we type code (c) stores a website’s files (d) opens web pages for us
- 7.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
- 8.Which of these is an opening tag? (a) </h1> (b) </b> (c) <p> (d) </p>
- 9.True or false: <ol> lists things in any order. (a) True (b) False
-
10.📋 What number does the browser show next to “Orange”?
<ol>
<li>Grapes</li>
<li>Guava</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Orange</li>
</ol> - 11.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
- 12.True or false: <ul> goes in the body. (a) False (b) True
- 13.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
- 14.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h3> or <h1>? (a) <h5> (b) <h1> (c) <h4> (d) <h3>
-
15.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="300"> (a) cake.jpg (b) Map of India (c) dog.jpg (d) map.png -
16.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h3>My pets</h3>
<h3>My best friend</h3>
<h2>Fun facts</h2> - 17.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <p> (d) <style>
- 18.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
19.📋 What number does the browser show next to “Orange”?
<ol>
<li>Banana</li>
<li>Orange</li>
<li>Guava</li>
</ol> -
20.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) Our school bus (b) fort.jpg (c) bus.jpg (d) tiger.jpg - 21.💬 Does the browser show comments on the page? (a) No (b) Yes
-
22.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Jamun</li>
</ol> - 23.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a hash # (c) a dot . (d) a dollar $
- 24.Which of these is a closing tag? (a) </p> (b) <b> (c) <body> (d) <li>
-
25.🔗 Which words do you click on?
<a href="contact.html">Maths fun</a> (a) Art corner (b) href (c) Maths fun (d) contact.html -
26.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p>
<p>Good morning!</p> -
27.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>The red kite</p> -->
<p>Hello, world!</p>
<p>Good morning!</p> (a) The red kite (b) Hello, world! (c) Good morning! (d) My best friend - 28.Which of these is true of a code editor? (a) answers page requests (b) has an address bar (c) saves our .html files (d) shows pages from the web
- 29.True or false: in <img>, alt shows if the image fails. (a) True (b) False
- 30.True or false: <ul> goes inside ul or ol. (a) False (b) True
- 31.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 32.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 33.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <h1> (d) <br>
- 34.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h3>? (a) <h4> (b) <h3> (c) <h2> (d) <h5>
-
35.🔗 Which words do you click on?
<a href="about.html">Visit the site</a> (a) about.html (b) href (c) Visit the site (d) Maths fun - 36.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) <html> (b) </html>
- 37.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 38.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 39.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
- 40.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
Answer key
- opens it in a new tab
- <!DOCTYPE html>
- <li>
- <h6>
- Birthday cake
- opens web pages for us
- <ol>
- <p>
- False
- 5
- in the body
- True
- 1
- <h5>
- map.png
- 4
- <p>
- an opening tag
- 2
- bus.jpg
- No
- 2
- a slash /
- </p>
- Maths fun
- 3
- The red kite
- saves our .html files
- True
- False
- in the head
- Yes
- <h1>
- <h5>
- Visit the site
- <html>
- in the head
- an opening tag
- a web browser
- the body
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids