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.📝 What does <hr> draw? (a) a table (b) a picture (c) a link (d) a line across the page
-
2.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>My pets</p>
<h2>Rain today</h2>
<p>My pets</p>
<p>My pets</p> -
3.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing<br>Roses are red<br>Sky is blue</p> - 4.True or false: <hr> is an empty tag. (a) True (b) False
- 5.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
-
6.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Good morning!</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) Rain today (c) Good morning! -
7.🔗 Where does this link open?
<a href="about.html">School news</a> (a) in the same tab (b) in a new tab - 8.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h1>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>
- 9.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
- 10.True or false: <a> goes in the head. (a) True (b) False
- 11.True or false: HTML on its own cannot count button clicks. (a) False (b) True
- 12.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
-
13.🔍 Which line is missing its closing tag?
line 1: <i>Hello, world!</i>
line 2: <em>Rain today
line 3: <p>My best friend</p> (a) line 2 (b) line 3 (c) line 1 - 14.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <li> (d) <p>
-
15.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Orange</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets -
16.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="400"> - 17.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) < (d) {
- 18.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
-
19.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="200"> (a) Map of India (b) kite.png (c) A red kite (d) width - 20.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
- 21.🔠 How many heading levels does HTML have? (a) 4 (b) 6 (c) 3 (d) 10
- 22.True or false: a web server shows pages from the web. (a) True (b) False
- 23.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
24.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="150"> -
25.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p>
<p>My pets</p> (a) Fun facts (b) I love mangoes. (c) My pets (d) The red kite -
26.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="350"> - 27.💬 Does the browser show comments on the page? (a) No (b) Yes
- 28.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 29.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
- 30.True or false: <li> lists things in any order. (a) False (b) True
-
31.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h4>Good morning!</h4>
<p>My best friend</p>
<p>I love mangoes.</p>
<h4>Fun facts</h4> -
32.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Litchi</li>
<li>Orange</li>
<li>Banana</li>
</ol> -
33.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p> -
34.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets - 35.True or false: in <img>, src tells which image to load. (a) True (b) False
-
36.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="50"> - 37.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
-
38.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> --> - 39.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 40.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
Answer key
- a line across the page
- 4
- 4
- True
- <h2>
- Rain today
- in the same tab
- <h1>
- a web server
- False
- True
- <!--
- line 2
- <li>
- bullets
- 400
- <
- Yes
- A red kite
- <a>
- 6
- False
- in the head
- 150
- Fun facts
- 350
- No
- in the head
- <img>
- False
- 3
- 4
- 3
- bullets
- True
- 50
- href
- 1
- an opening tag
- a web browser
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids