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="fort.jpg" alt="An old fort" width="350"> (a) width (b) An old fort (c) A tiger asleep (d) fort.jpg - 2.📄 Can HTML on its own pick a random number? (a) Yes (b) No
- 3.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
4.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Jamun</li>
<li>Mango</li>
</ol> (a) numbers (b) bullets - 5.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
6.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>My best friend</p> -->
<!-- <p>Good morning!</p> --> - 7.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
-
8.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Birds sing</p> -
9.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Papaya</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets - 10.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) alt (c) height (d) src
- 11.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
12.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Banana</li>
<li>Litchi</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Orange</li>
</ul> - 13.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
- 14.Which of these is true of a code editor? (a) has an address bar (b) answers page requests (c) saves our .html files (d) hosts websites online
- 15.True or false: <li> is an empty tag. (a) False (b) True
- 16.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <hr> (d) <ul>
- 17.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) <head>
- 18.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
19.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>I love mangoes.</p>
<p>Our school trip</p>
<!-- <p>Fun facts</p> --> (a) I love mangoes. (b) Rain today (c) Fun facts (d) Our school trip - 20.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
- 21.Which of these is true of a web browser? (a) saves our .html files (b) is where we type code (c) shows pages from the web (d) shows line numbers
-
22.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Litchi</li>
<li>Mango</li>
</ul> - 23.True or false: <b> has a closing tag. (a) False (b) True
- 24.True or false: HTML on its own can run a game loop. (a) True (b) False
- 25.📋 Which list tag is an ordered list? (a) <ul> (b) <ol> (c) <li>
- 26.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 27.True or false: <meta> has a closing tag. (a) True (b) False
- 28.Which of these is true of a web browser? (a) answers page requests (b) saves our .html files (c) opens web pages for us (d) is where we type code
- 29.📄 Can HTML on its own count button clicks? (a) No (b) Yes
-
30.🔍 One closing tag is missing. Which one?
<strong>Hello, world!
<p>My best friend</p>
<h3>Rain today</h3> (a) </small> (b) </h3> (c) </strong> (d) </p> -
31.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="150"> (a) bus.jpg (b) The full moon (c) moon.png (d) fort.jpg -
32.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Banana</li>
<li>Mango</li>
<li>Papaya</li>
</ol> - 33.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h3> or <h4>? (a) <h3> (b) <h5> (c) <h4> (d) <h1>
-
34.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) moon.png (b) bus.jpg (c) dog.jpg (d) A happy dog - 35.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
36.🔍 One closing tag is missing. Which one?
<em>Rain today
<h3>Hello, world!</h3>
<u>I love mangoes.</u> (a) </em> (b) </h3> (c) </u> (d) </strong> -
37.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing<br>Kites fly high<br>Stars shine</p> -
38.🔍 Which line is missing its closing tag?
line 1: <u>Hello, world!
line 2: <small>Fun facts</small>
line 3: <h2>Good morning!</h2> (a) line 2 (b) line 3 (c) line 1 - 39.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
- 40.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong/> (c) </strong> (d) <strong>
Answer key
- An old fort
- No
- a closing tag
- numbers
- an opening tag
- 1
- 1
- 3
- bullets
- height
- an empty tag
- 6
- 6
- saves our .html files
- False
- <ul>
- <!DOCTYPE html>
- an opening tag
- Fun facts
- <ul>
- shows pages from the web
- 3
- True
- False
- <ol>
- No
- False
- opens web pages for us
- No
- </strong>
- moon.png
- 3
- <h1>
- dog.jpg
- Yes
- </em>
- 4
- line 1
- <a>
- </strong>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids