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.True or false: <ul> shows 1, 2, 3 numbers. (a) False (b) True
- 2.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) sends pages over the net (d) colours code to help us
-
3.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>The red kite</h2>
<p>My pets</p> - 4.🖼️ Which attribute of <img> tells which image to load? (a) src (b) alt (c) height (d) width
- 5.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
-
6.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p>
<p>I love mangoes.</p> -
7.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="200"> (a) tiger.jpg (b) bus.jpg (c) fort.jpg (d) Our school bus -
8.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Rain today</p>
<p>My best friend</p>
<h2>Fun facts</h2> - 9.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
- 10.🔍 Which is the odd one out? (a) is where we type code (b) shows pages from the web (c) shows line numbers (d) saves our .html files
- 11.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 12.📋 Which list tag lists steps in order? (a) <ol> (b) <ul> (c) <li>
-
13.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<p>Cricket is fun.</p> -
14.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<p>Cricket is fun.</p> - 15.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 16.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
- 17.💬 Does the browser show comments on the page? (a) No (b) Yes
-
18.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>My pets</h3>
<p>Cricket is fun.</p>
<h4>The red kite</h4> -
19.🔍 One closing tag is missing. Which one?
<strong>My best friend
<p>Good morning!</p>
<h2>Fun facts</h2> (a) </p> (b) </strong> (c) </h2> (d) </small> - 20.🌐 Which one is where we type code? (a) a web server (b) a code editor (c) a web browser
- 21.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h4>? (a) <h5> (b) <h1> (c) <h2> (d) <h4>
- 22.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 23.True or false: in <img>, alt is read by screen readers. (a) False (b) True
-
24.🔍 One closing tag is missing. Which one?
<h1>My best friend</h1>
<small>The red kite</small>
<em>Hello, world! (a) </h1> (b) </p> (c) </small> (d) </em> -
25.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> --> - 26.True or false: <ol> is an ordered list. (a) False (b) True
-
27.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Mango</li>
</ul> - 28.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h1>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
-
29.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p>
<p>Hello, world!</p> (a) Cricket is fun. (b) Hello, world! (c) My pets - 30.📄 Can HTML on its own make a form? (a) Yes (b) No
-
31.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) maths.html (b) https://example.com (c) Contact us (d) contact.html - 32.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
- 33.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) width (c) src (d) height
-
34.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Mango</li>
<li>Litchi</li>
<li>Orange</li>
<li>Banana</li>
<li>Guava</li>
</ul> -
35.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>The red kite</p>
<p>Our school trip</p>
<h2>Hello, world!</h2>
<h3>My pets</h3> - 36.🌐 Which one shows pages from the web? (a) a web browser (b) a code editor (c) a web server
- 37.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
- 38.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <!DOCTYPE html> (d) <html>
-
39.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Cricket is fun.</p>
<p>Cricket is fun.</p> - 40.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
Answer key
- False
- sends pages over the net
- 2
- src
- opens it in a new tab
- 3
- bus.jpg
- 3
- <a href="about.html">
- shows pages from the web
- an empty tag
- <ol>
- 3
- 3
- has a closing tag
- to leave notes
- No
- 3
- </strong>
- a code editor
- <h1>
- an empty tag
- True
- </em>
- 1
- True
- 2
- <h1>
- My pets
- Yes
- contact.html
- <a>
- alt
- 6
- 3
- a web browser
- 6
- <!DOCTYPE html>
- 3
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids