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 heading shows the BIGGEST text: <h2>, <h1>, <h4> or <h5>? (a) <h2> (b) <h1> (c) <h4> (d) <h5>
- 2.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
- 3.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <html> (b) <!DOCTYPE html>
- 4.Which of these is true of a code editor? (a) saves our .html files (b) hosts websites online (c) sends pages over the net (d) opens web pages for us
- 5.📝 What do we need to write HTML? (a) a printer (b) a plain text editor (c) a microphone (d) a paintbrush
- 6.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
- 7.True or false: HTML on its own can make links to pages. (a) True (b) False
- 8.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 9.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the body (d) the doctype
- 10.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <!DOCTYPE html> (c) <html> (d) <body>
-
11.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h3>Our school trip</h3>
<h2>Fun facts</h2>
<p>Cricket is fun.</p> -
12.🔗 Which words do you click on?
<a href="games.html">Maths fun</a> (a) Maths fun (b) href (c) Art corner (d) games.html - 13.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <p> (c) <h6> (d) <br>
- 14.Which of these is a closing tag? (a) <li> (b) <title> (c) <h1> (d) </p>
-
15.🔍 Which line is missing its closing tag?
line 1: <u>Hello, world!</u>
line 2: <strong>Cricket is fun.
line 3: <small>Our school trip</small> (a) line 2 (b) line 1 (c) line 3 - 16.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
- 17.Which of these is an empty tag? (a) <p> (b) <h1> (c) <hr> (d) <title>
-
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="100"> (a) A red kite (b) kite.png (c) width (d) Map of India - 19.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
- 20.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
- 21.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
-
22.🔍 One closing tag is missing. Which one?
<em>Hello, world!
<small>I love mangoes.</small>
<p>Our school trip</p> (a) </p> (b) </small> (c) </h1> (d) </em> - 23.Which of these is true of a web browser? (a) shows pages from the web (b) shows line numbers (c) colours code to help us (d) sends pages over the net
-
24.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue<br>Roses are red<br>Stars shine<br>Birds sing</p> -
25.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Good morning!</p>
<h2>The red kite</h2>
<h2>Hello, world!</h2>
<p>Rain today</p> - 26.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
-
27.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) Easy snacks (b) My Hobbies (c) body (d) I like to read. -
28.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>My best friend</h3>
<h2>Hello, world!</h2> - 29.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
- 30.True or false: <table> goes in the body. (a) False (b) True
- 31.True or false: <title> is an empty tag. (a) True (b) False
- 32.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h2>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
-
33.🔗 Which words do you click on?
<a href="news.html">Play games</a> (a) Play games (b) news.html (c) href (d) About us - 34.🌍 Which program shows a web page to us? (a) a web browser (b) a paint program (c) a calculator (d) a music player
- 35.True or false: <hr> has a closing tag. (a) False (b) True
-
36.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) My Hobbies (b) Try this poha. (c) index.html (d) All about me -
37.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<p>My pets</p> (a) Hello, world! (b) My pets (c) I love mangoes. (d) Rain today -
38.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>The red kite</h2>
<p>The red kite</p>
<p>Good morning!</p>
<p>Rain today</p> - 39.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 40.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h2>? (a) <h6> (b) <h4> (c) <h5> (d) <h2>
Answer key
- <h1>
- <ul>
- <!DOCTYPE html>
- saves our .html files
- a plain text editor
- <ol>
- True
- an opening tag
- the body
- <!DOCTYPE html>
- 3
- Maths fun
- <h1>
- </p>
- line 2
- opens it in a new tab
- <hr>
- A red kite
- <
- href
- Yes
- </em>
- shows pages from the web
- 5
- 3
- <li>
- Easy snacks
- 3
- <a href="about.html">
- True
- False
- <h1>
- Play games
- a web browser
- False
- My Hobbies
- Hello, world!
- 4
- No
- <h2>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids