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.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
2.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Our school trip</p>
<p>My best friend</p> - 3.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <li> (d) <ol>
- 4.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <br> (c) <ul> (d) <hr>
- 5.Which of these is true of a code editor? (a) colours code to help us (b) stores a website’s files (c) answers page requests (d) opens web pages for us
-
6.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Cricket is fun.</p>
<h3>The red kite</h3> - 7.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) is where we type code (d) has an address bar
- 8.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h4>? (a) <h2> (b) <h5> (c) <h4> (d) <h6>
- 9.🔍 Which is the odd one out? (a) is where we type code (b) sends pages over the net (c) saves our .html files (d) colours code to help us
-
10.🔗 Which address opens when you click this link?
<a href="art.html">School news</a> (a) quiz.html (b) School news (c) news.html (d) art.html - 11.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
-
12.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="250"> - 13.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) <h2/> (d) </h2>
- 14.True or false: <meta> is an empty tag. (a) True (b) False
- 15.True or false: a code editor saves our .html files. (a) False (b) True
-
16.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing<br>Rivers flow</p> - 17.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h4>? (a) <h2> (b) <h4> (c) <h6> (d) <h3>
-
18.🔗 Where does this link open?
<a href="about.html" target="_blank">School news</a> (a) in the same tab (b) in a new tab - 19.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
-
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="50"> (a) width (b) Our school bus (c) An old fort (d) bus.jpg -
21.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Litchi</li>
<li>Mango</li>
</ul> (a) bullets (b) numbers -
22.🔗 Where does this link open?
<a href="about.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab -
23.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>Hello, world!</p>
<p>Cricket is fun.</p>
<p>Fun facts</p>
<!-- <p>The red kite</p> --> - 24.Which of these has a closing tag? (a) <ul> (b) <meta> (c) <img> (d) <hr>
- 25.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
-
26.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="300"> (a) Our school bus (b) tiger.jpg (c) bus.jpg (d) fort.jpg - 27.True or false: in <img>, alt is read by screen readers. (a) False (b) True
- 28.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) src (c) alt (d) width
-
29.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>My pets</p>
<h2>Good morning!</h2>
<p>I love mangoes.</p>
<p>The red kite</p> -
30.📋 What number does the browser show next to “Papaya”?
<ol start="8">
<li>Litchi</li>
<li>Grapes</li>
<li>Orange</li>
<li>Papaya</li>
<li>Mango</li>
<li>Guava</li>
</ol> - 31.True or false: a code editor turns HTML into a page. (a) True (b) False
- 32.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
-
33.🔍 One closing tag is missing. Which one?
<h3>I love mangoes.</h3>
<h2>Hello, world!</h2>
<p>Rain today (a) </p> (b) </h2> (c) </h3> (d) </i> - 34.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
-
35.🔗 Where does this link open?
<a href="about.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab - 36.True or false: <ol> is an ordered list. (a) False (b) True
-
37.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>My best friend</p>
<!-- <p>Fun facts</p> --> - 38.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
- 39.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 40.🖼️ Does <img> need a closing tag? (a) Yes (b) No
Answer key
- Yes
- 3
- <li>
- <ol>
- colours code to help us
- 2
- is where we type code
- <h6>
- sends pages over the net
- art.html
- a web server
- 250
- </h2>
- True
- True
- 3
- <h2>
- in a new tab
- Markup
- Our school bus
- bullets
- in a new tab
- 4
- <ul>
- <a href="about.html">
- bus.jpg
- True
- height
- 2
- 11
- False
- False
- </p>
- <h6>
- in a new tab
- True
- 1
- a code editor
- Yes
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids