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.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="250"> - 2.Which of these goes in the head? (a) <style> (b) <table> (c) <a> (d) <img>
- 3.True or false: a web browser shows line numbers. (a) False (b) True
-
4.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>My best friend</p>
<!-- <p>Our school trip</p> --> -
5.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) A happy dog (b) dog.jpg (c) bus.jpg (d) moon.png -
6.📋 What number does the browser show next to “Banana”?
<ol start="2">
<li>Litchi</li>
<li>Papaya</li>
<li>Banana</li>
<li>Mango</li>
<li>Guava</li>
</ol> -
7.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="250"> -
8.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p>
<p>Rain today</p>
<p>The red kite</p> (a) Cricket is fun. (b) Our school trip (c) Rain today (d) The red kite - 9.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) opens web pages for us (d) colours code to help us
-
10.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p>
<!-- <p>The red kite</p> -->
<!-- <p>Fun facts</p> --> -
11.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>My best friend</p>
<p>My pets</p>
<!-- <p>Rain today</p> --> (a) Rain today (b) My pets (c) My best friend (d) Cricket is fun. -
12.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Papaya</li>
<li>Mango</li>
<li>Litchi</li>
<li>Guava</li>
</ul> - 13.💬 How does an HTML comment end? (a) --> (b) >> (c) */ (d) //
- 14.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) src (c) alt (d) width
- 15.💬 Does the browser show comments on the page? (a) No (b) Yes
- 16.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) colours code to help us (d) hosts websites online
-
17.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>The red kite</p>
<!-- <p>Fun facts</p> --> -
18.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) Easy snacks (c) Cricket Club (d) body - 19.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 20.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) < (d) {
- 21.🔢 In a basic web page file, which comes LAST? (a) </html> (b) </head> (c) <!DOCTYPE html> (d) </body>
- 22.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
- 23.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a dot (d) as a new line
- 24.True or false: <title> is an empty tag. (a) True (b) False
- 25.True or false: <li> shows 1, 2, 3 numbers. (a) True (b) False
-
26.🔗 Which address opens when you click this link?
<a href="news.html">Maths fun</a> (a) games.html (b) news.html (c) Maths fun (d) quiz.html -
27.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="150"> - 28.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
-
29.🔍 One closing tag is missing. Which one?
<u>Good morning!</u>
<b>I love mangoes.
<i>The red kite</i> (a) </strong> (b) </b> (c) </u> (d) </i> - 30.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h2>? (a) <h3> (b) <h5> (c) <h2> (d) <h4>
- 31.True or false: a web browser turns HTML into a page. (a) False (b) True
- 32.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) an element name (d) a comment
- 33.True or false: in <img>, width tells which image to load. (a) False (b) True
- 34.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 35.📄 Can HTML on its own run a game loop? (a) No (b) Yes
-
36.📋 What number does the browser show next to “Mango”?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Papaya</li>
</ol> - 37.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
- 38.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h4>? (a) <h4> (b) <h6> (c) <h3> (d) <h1>
- 39.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
40.🔍 One closing tag is missing. Which one?
<h2>Hello, world!</h2>
<small>My pets</small>
<u>My best friend (a) </h2> (b) </p> (c) </u> (d) </small>
Answer key
- 250
- <style>
- False
- 2
- dog.jpg
- 4
- 250
- Our school trip
- colours code to help us
- 2
- Rain today
- 5
- -->
- alt
- No
- hosts websites online
- 2
- Easy snacks
- has a closing tag
- <
- </html>
- opens it in a new tab
- as one space
- False
- False
- news.html
- 150
- <ul>
- </b>
- <h5>
- True
- an attribute
- False
- No
- No
- 2
- element
- <h6>
- has a closing tag
- </u>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids