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.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<p>Good morning!</p> (a) Cricket is fun. (b) Good morning! (c) I love mangoes. (d) My best friend - 2.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as one space (c) as 5 spaces (d) as a dot
- 3.True or false: <ul> goes in the body. (a) True (b) False
- 4.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
- 5.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 6.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) { (d) (
-
7.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="300"> (a) width (b) An old fort (c) Our school bus (d) bus.jpg - 8.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
- 9.📝 What does <br> do? (a) makes text bold (b) makes a list (c) starts a new line (d) adds a picture
- 10.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h1>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
- 11.Which of these is a closing tag? (a) <body> (b) <p> (c) </li> (d) <b>
- 12.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h6>? (a) <h6> (b) <h5> (c) <h4> (d) <h2>
-
13.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Litchi</li>
</ol> (a) bullets (b) numbers - 14.True or false: HTML on its own can add pictures to a page. (a) False (b) True
-
15.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>My pets</h2>
<p>My best friend</p>
<p>Hello, world!</p> -
16.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="100"> -
17.📋 What number does the browser show next to “Banana”?
<ol start="3">
<li>Grapes</li>
<li>Banana</li>
<li>Orange</li>
</ol> - 18.🧱 HTML gives a web page its ___. (a) structure (b) sound (c) speed (d) colours
- 19.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <!DOCTYPE html> (d) <body>
- 20.🖼️ Which attribute of <img> tells which image to load? (a) height (b) src (c) alt (d) width
- 21.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
- 22.True or false: a code editor saves our .html files. (a) True (b) False
- 23.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) <h1/> (d) </h1>
-
24.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Banana</li>
</ul> (a) bullets (b) numbers - 25.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
- 26.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
-
27.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Rain today</p>
<p>Fun facts</p>
<!-- <p>My pets</p> --> (a) Rain today (b) My pets (c) My best friend (d) Fun facts -
28.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Mango</li>
<li>Banana</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Guava</li>
</ul> - 29.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
- 30.True or false: a code editor sends pages over the net. (a) False (b) True
-
31.📋 What number does the browser show next to “Mango”?
<ol>
<li>Banana</li>
<li>Jamun</li>
<li>Mango</li>
</ol> -
32.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>The red kite</p>
<!-- <p>My pets</p> --> (a) The red kite (b) Rain today (c) My pets - 33.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
-
34.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>My best friend</p>
<p>Good morning!</p> - 35.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
- 36.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
37.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p>
<p>My best friend</p> - 38.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h5> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h2>
-
39.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Hello, world!</p>
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p> - 40.🏷️ Which is the closing tag for <small>? (a) <small/> (b) <small> (c) <\small> (d) </small>
Answer key
- My best friend
- as one space
- True
- <!--
- an empty tag
- <
- Our school bus
- Yes
- starts a new line
- <h5>
- </li>
- <h2>
- numbers
- True
- 2
- 100
- 4
- structure
- <!DOCTYPE html>
- src
- a line across the page
- True
- </h1>
- bullets
- <ul>
- <a>
- My pets
- 6
- <ul>
- False
- 3
- My pets
- 6
- 1
- <h6>
- Yes
- 2
- <h5>
- 4
- </small>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids