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: in <img>, src names the picture file. (a) False (b) True
- 2.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) height (c) width (d) alt
- 3.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
- 4.True or false: <ul> shows 1, 2, 3 numbers. (a) False (b) True
- 5.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
- 6.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 7.True or false: <table> goes in the head. (a) False (b) True
- 8.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 9.True or false: <img> is an empty tag. (a) False (b) True
- 10.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
11.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>Our school trip</h2>
<h2>The red kite</h2>
<h2>My best friend</h2>
<p>Hello, world!</p> - 12.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h5> or <h1>? (a) <h5> (b) <h4> (c) <h1> (d) <h3>
- 13.🔍 Which is the odd one out? (a) hosts websites online (b) stores a website’s files (c) answers page requests (d) turns HTML into a page
- 14.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) <\strong> (c) </strong> (d) <strong>
- 15.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
-
16.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Guava</li>
<li>Grapes</li>
<li>Orange</li>
<li>Mango</li>
<li>Papaya</li>
</ul> - 17.Which of these is an opening tag? (a) <p> (b) </li> (c) </h1> (d) </p>
-
18.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing<br>Sky is blue</p> -
19.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h3>Cricket is fun.</h3>
<p>The red kite</p> - 20.Which of these is true of a code editor? (a) shows line numbers (b) answers page requests (c) sends pages over the net (d) hosts websites online
-
21.🔗 Where does this link open?
<a href="art.html" target="_blank">Contact us</a> (a) in the same tab (b) in a new tab -
22.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="400"> (a) Map of India (b) map.png (c) dog.jpg (d) cake.jpg - 23.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 24.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
25.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Litchi</li>
<li>Papaya</li>
<li>Banana</li>
</ol> - 26.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Machine (d) Mouse
- 27.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 28.🌐 Which one shows line numbers? (a) a code editor (b) a web browser (c) a web server
- 29.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <hr> (d) <br>
-
30.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>Our school trip</p>
<p>My pets</p>
<p>The red kite</p> (a) Our school trip (b) Fun facts (c) The red kite (d) My pets -
31.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>My pets</p> -->
<p>Our school trip</p>
<p>Rain today</p>
<p>My best friend</p> - 32.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
33.🔍 Which line is missing its closing tag?
line 1: <p>My pets</p>
line 2: <em>The red kite</em>
line 3: <small>I love mangoes. (a) line 3 (b) line 1 (c) line 2 - 34.Which of these is an opening tag? (a) </h1> (b) </b> (c) </title> (d) <body>
-
35.🔍 Which line is missing its closing tag?
line 1: <strong>Good morning!</strong>
line 2: <p>Rain today
line 3: <u>Our school trip</u> (a) line 1 (b) line 2 (c) line 3 -
36.🔗 Which words do you click on?
<a href="contact.html">Art corner</a> (a) contact.html (b) Art corner (c) School news (d) href - 37.🔗 Which attribute holds the address of a link? (a) id (b) href (c) alt (d) src
-
38.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Guava</li>
<li>Litchi</li>
</ul> (a) bullets (b) numbers -
39.🔍 Which line is missing its closing tag?
line 1: <u>Hello, world!
line 2: <h1>Fun facts</h1>
line 3: <b>My best friend</b> (a) line 2 (b) line 1 (c) line 3 -
40.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Stars shine</p>
Answer key
- True
- height
- on the browser tab
- False
- <ol>
- a closing tag
- False
- Yes
- True
- Yes
- 2
- <h1>
- turns HTML into a page
- </strong>
- <li>
- 6
- <p>
- 3
- 2
- shows line numbers
- in a new tab
- map.png
- an opening tag
- an opening tag
- 4
- Markup
- an opening tag
- a code editor
- <ul>
- Fun facts
- 4
- No
- line 3
- <body>
- line 2
- Art corner
- href
- bullets
- line 1
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids