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.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <html> (c) </html> (d) <!DOCTYPE html>
- 2.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
- 3.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h5> or <h6>? (a) <h6> (b) <h5> (c) <h2> (d) <h1>
- 4.🔍 Which is the odd one out? (a) turns HTML into a page (b) answers page requests (c) sends pages over the net (d) hosts websites online
- 5.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h3>
-
6.🔗 Which address opens when you click this link?
<a href="news.html">Art corner</a> (a) Art corner (b) news.html (c) quiz.html (d) games.html -
7.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Litchi</li>
<li>Orange</li>
</ol> (a) bullets (b) numbers - 8.True or false: in <img>, width tells which image to load. (a) True (b) False
-
9.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Orange</li>
<li>Jamun</li>
<li>Papaya</li>
</ol> -
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="150"> (a) A tiger asleep (b) width (c) An old fort (d) fort.jpg - 11.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 12.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <b> (d) <input>
-
13.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) Planets (b) Art Gallery (c) index.html (d) I like to read. - 14.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
15.🔗 Where does this link open?
<a href="news.html">Art corner</a> (a) in the same tab (b) in a new tab - 16.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
-
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) width (b) An old fort (c) Our school bus (d) bus.jpg - 18.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h5>? (a) <h5> (b) <h2> (c) <h6> (d) <h1>
-
19.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>The red kite</p>
<h2>Our school trip</h2> - 20.Which of these is true of a code editor? (a) shows pages from the web (b) answers page requests (c) has an address bar (d) saves our .html files
- 21.True or false: in <img>, width describes the picture. (a) True (b) False
-
22.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<p>I love mangoes.</p> (a) Hello, world! (b) Rain today (c) I love mangoes. - 23.Which of these is true of a web browser? (a) is where we type code (b) opens web pages for us (c) saves our .html files (d) answers page requests
-
24.🔗 Which words do you click on?
<a href="maths.html">School news</a> (a) href (b) maths.html (c) School news (d) Take the quiz -
25.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high</p> - 26.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 27.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) editor (d) element
- 28.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
- 29.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 30.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <body> (b) <!DOCTYPE html>
-
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) tiger.jpg (b) A red kite (c) width (d) A tiger asleep - 32.💬 How does an HTML comment start? (a) // (b) /* (c) <!-- (d) #
- 33.💬 Does the browser show comments on the page? (a) No (b) Yes
- 34.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
-
35.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow<br>Kites fly high</p> -
36.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>My pets</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Rain today</p>
<!-- <p>The red kite</p> --> -
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) width (b) A red kite (c) tiger.jpg (d) A tiger asleep -
38.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="50"> - 39.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
-
40.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<p>Fun facts</p>
Answer key
- <!DOCTYPE html>
- href
- <h1>
- turns HTML into a page
- <h2>
- news.html
- numbers
- False
- 3
- An old fort
- Yes
- <input>
- Art Gallery
- a closing tag
- in the same tab
- <ul>
- Our school bus
- <h1>
- 2
- saves our .html files
- False
- Rain today
- opens web pages for us
- School news
- 2
- an opening tag
- element
- a web server
- True
- <!DOCTYPE html>
- A tiger asleep
- <!--
- No
- to leave notes
- 3
- 1
- A tiger asleep
- 50
- <ol>
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids