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 code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a alt="about.html">
- 2.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
- 3.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
- 4.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h6> or <h4>? (a) <h4> (b) <h6> (c) <h5> (d) <h1>
- 5.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h2>? (a) <h6> (b) <h2> (c) <h5> (d) <h1>
- 6.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
7.🔗 Where does this link open?
<a href="news.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 8.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h6> or <h2>? (a) <h2> (b) <h6> (c) <h4> (d) <h5>
- 9.Which of these is true of a web browser? (a) turns HTML into a page (b) hosts websites online (c) answers page requests (d) colours code to help us
-
10.🔗 Which address opens when you click this link?
<a href="quiz.html">Play games</a> (a) games.html (b) about.html (c) Play games (d) quiz.html - 11.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 4 (d) 3
- 12.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <!DOCTYPE html> (c) <head> (d) <html>
- 13.True or false: HTML on its own cannot make a form. (a) True (b) False
- 14.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
- 15.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
-
16.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> (a) kite.png (b) tiger.jpg (c) map.png (d) A tiger asleep - 17.🧱 HTML gives a web page its ___. (a) sound (b) colours (c) speed (d) structure
-
18.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) All about me (b) body (c) Try this poha. (d) Class 7 Blog -
19.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> -->
<p>Fun facts</p>
<p>Rain today</p> - 20.True or false: in <img>, width shows if the image fails. (a) False (b) True
- 21.True or false: HTML on its own can make tables. (a) False (b) True
- 22.💬 Does the browser show comments on the page? (a) No (b) Yes
- 23.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
-
24.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Litchi</li>
<li>Banana</li>
<li>Papaya</li>
<li>Orange</li>
<li>Jamun</li>
</ol> -
25.🔗 Which words do you click on?
<a href="maths.html">About us</a> (a) maths.html (b) Contact us (c) About us (d) href - 26.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 27.📄 Can HTML on its own run a game loop? (a) Yes (b) No
- 28.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
- 29.🏷️ Which is the closing tag for <em>? (a) </em> (b) <em> (c) <\em> (d) <em/>
-
30.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>I love mangoes.</h3>
<p>I love mangoes.</p>
<h4>My pets</h4> - 31.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <li> (d) <ol>
- 32.Which of these is an empty tag? (a) <meta> (b) <b> (c) <p> (d) <h1>
- 33.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
- 34.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
- 35.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
-
36.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Fun facts</p>
<h4>Rain today</h4>
<p>Hello, world!</p> -
37.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>Our school trip</p> --> -
38.🔗 Which address opens when you click this link?
<a href="https://example.com">Play games</a> (a) art.html (b) maths.html (c) Play games (d) https://example.com - 39.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 40.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a slash / (d) a dot .
Answer key
- <a href="about.html">
- to leave notes
- <
- <h6>
- <h1>
- an opening tag
- in a new tab
- <h6>
- turns HTML into a page
- quiz.html
- 6
- <!DOCTYPE html>
- False
- False
- a code editor
- tiger.jpg
- structure
- All about me
- 3
- False
- True
- No
- to describe the image
- 3
- About us
- No
- No
- a web server
- </em>
- 3
- <li>
- <meta>
- <!DOCTYPE html>
- False
- True
- 2
- 3
- https://example.com
- a closing tag
- a slash /
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids