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.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="50"> (a) width (b) moon.png (c) Our school bus (d) The full moon - 2.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
- 3.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 4.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 5.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h1> or <h2>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
- 6.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
- 7.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
-
8.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="350"> (a) fort.jpg (b) The full moon (c) moon.png (d) bus.jpg -
9.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>Hello, world!</h3>
<p>Cricket is fun.</p> - 10.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
-
11.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) The full moon (b) dog.jpg (c) width (d) A happy dog - 12.True or false: <ol> is one item of a list. (a) True (b) False
-
13.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h2>Fun facts</h2>
<p>Our school trip</p> - 14.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
- 15.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <html> (d) <!DOCTYPE html>
- 16.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h1> or <h2>? (a) <h6> (b) <h1> (c) <h2> (d) <h4>
- 17.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 18.🏷️ Which is the closing tag for <i>? (a) <i> (b) </i> (c) <\i> (d) <i/>
-
19.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Hello, world!</p>
<p>My best friend</p>
<p>Good morning!</p> -
20.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>I love mangoes.</p>
<p>Rain today</p>
<!-- <p>My pets</p> --> - 21.True or false: HTML on its own cannot make headings. (a) True (b) False
-
22.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Fun facts</p> - 23.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h6>? (a) <h5> (b) <h2> (c) <h6> (d) <h3>
- 24.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
-
25.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>The red kite</p> --> - 26.Which of these is an opening tag? (a) </title> (b) <p> (c) </h1> (d) </b>
- 27.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h3> (d) <h6>
-
28.🔗 Which words do you click on?
<a href="quiz.html">Take the quiz</a> (a) quiz.html (b) Play games (c) href (d) Take the quiz - 29.📄 Which part holds everything you see on the page? (a) the doctype (b) the head (c) the body (d) the title
-
30.🔗 Which address opens when you click this link?
<a href="quiz.html">School news</a> (a) about.html (b) games.html (c) School news (d) quiz.html - 31.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
- 32.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </body> (c) <!DOCTYPE html> (d) <body>
- 33.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h1> or <h4>? (a) <h2> (b) <h4> (c) <h3> (d) <h1>
- 34.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as a new line (d) as 5 spaces
- 35.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Link (c) Line (d) Language
- 36.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <pic> (d) <img>
- 37.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) alt (c) width (d) height
- 38.True or false: <ul> is an unordered list. (a) False (b) True
-
39.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> --> (a) My pets (b) Hello, world! (c) I love mangoes. - 40.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h3> or <h5>? (a) <h5> (b) <h3> (c) <h6> (d) <h2>
Answer key
- The full moon
- a web browser
- Yes
- in the head
- <h4>
- alt
- opens it in a new tab
- moon.png
- 2
- <ul>
- A happy dog
- False
- 2
- on the browser tab
- <!DOCTYPE html>
- <h6>
- in the body
- </i>
- 1
- 3
- False
- 1
- <h2>
- No
- 1
- <p>
- <h6>
- Take the quiz
- the body
- quiz.html
- False
- <!DOCTYPE html>
- <h1>
- as one space
- Language
- <img>
- alt
- True
- Hello, world!
- <h2>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids