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.🔗 Where does this link open?
<a href="games.html">Contact us</a> (a) in the same tab (b) in a new tab - 2.Which of these is a closing tag? (a) <p> (b) </li> (c) <li> (d) <body>
- 3.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <head> (d) <body>
-
4.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="150"> - 5.True or false: <img> goes in the body. (a) False (b) True
-
6.🔍 Which line is missing its closing tag?
line 1: <u>Rain today</u>
line 2: <h1>Hello, world!</h1>
line 3: <strong>Good morning! (a) line 1 (b) line 3 (c) line 2 - 7.Which of these goes in the body? (a) <title> (b) <style> (c) <ul> (d) <meta charset="utf-8">
-
8.🔍 One closing tag is missing. Which one?
<small>Our school trip</small>
<em>Fun facts
<i>Hello, world!</i> (a) </small> (b) </b> (c) </i> (d) </em> - 9.True or false: <ul> shows bullet points. (a) False (b) True
- 10.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) an attribute (d) a comment
- 11.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 12.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <html> (c) <head> (d) <!DOCTYPE html>
-
13.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) Take the quiz (b) Play games (c) maths.html (d) href -
14.🔍 One closing tag is missing. Which one?
<h1>Fun facts</h1>
<strong>Rain today</strong>
<u>Cricket is fun. (a) </u> (b) </b> (c) </strong> (d) </h1> -
15.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>My best friend</p>
<p>My pets</p>
<p>The red kite</p> (a) My pets (b) My best friend (c) Hello, world! (d) The red kite - 16.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
- 17.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <ul> (c) <li>
-
18.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="200"> -
19.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab - 20.Which of these goes in the head? (a) <table> (b) <p> (c) <style> (d) <ul>
- 21.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
-
22.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<p>Rain today</p> (a) Hello, world! (b) Rain today (c) Our school trip -
23.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high<br>Sky is blue</p> - 24.Which of these has a closing tag? (a) <b> (b) <hr> (c) <img> (d) <br>
- 25.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
- 26.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
27.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Jamun</li>
</ul> - 28.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h6> (d) <h1>
- 29.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) editor (d) attribute
-
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="200"> (a) A tiger asleep (b) An old fort (c) width (d) fort.jpg - 31.💾 A web page file usually ends with which extension? (a) .txt (b) .html (c) .mp3 (d) .png
-
32.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Hello, world!</p>
<p>My best friend</p>
<p>Fun facts</p> (a) My best friend (b) My pets (c) Hello, world! (d) Fun facts - 33.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 34.True or false: <ul> goes inside ul or ol. (a) False (b) True
- 35.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h1>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
-
36.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Papaya</li>
<li>Banana</li>
</ol> (a) numbers (b) bullets -
37.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Guava</li>
<li>Banana</li>
</ul> - 38.True or false: HTML on its own can make a form. (a) True (b) False
-
39.🔗 Which address opens when you click this link?
<a href="art.html">Contact us</a> (a) quiz.html (b) art.html (c) Contact us (d) news.html -
40.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="300">
Answer key
- in the same tab
- </li>
- <!DOCTYPE html>
- 150
- True
- line 3
- <ul>
- </em>
- True
- an attribute
- No
- <!DOCTYPE html>
- Take the quiz
- </u>
- Hello, world!
- a web server
- <ol>
- 200
- in a new tab
- <style>
- False
- Hello, world!
- 3
- <b>
- width
- an empty tag
- 2
- <h1>
- element
- An old fort
- .html
- My pets
- an empty tag
- False
- <h1>
- numbers
- 3
- True
- art.html
- 300
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids