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>Fun facts</p>
<p>The red kite</p>
<p>My pets</p>
<!-- <p>Rain today</p> --> (a) Fun facts (b) My pets (c) Rain today (d) The red kite -
2.🔗 Which words do you click on?
<a href="quiz.html">Art corner</a> (a) Art corner (b) href (c) School news (d) quiz.html -
3.🔗 Where does this link open?
<a href="news.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab -
4.🔗 Where does this link open?
<a href="games.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab - 5.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h4> or <h2>? (a) <h3> (b) <h2> (c) <h4> (d) <h1>
- 6.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Machine (d) Markup
-
7.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) maths.html (b) Play games (c) https://example.com (d) contact.html - 8.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
- 9.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h1>? (a) <h6> (b) <h1> (c) <h4> (d) <h3>
- 10.🔤 In “HTML”, what does the L stand for? (a) Language (b) Link (c) Laptop (d) Line
-
11.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="200"> (a) kite.png (b) map.png (c) cake.jpg (d) A red kite - 12.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) saves our .html files (d) turns HTML into a page
-
13.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Hello, world!</p>
<p>Our school trip</p> -
14.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) fort.jpg (b) tiger.jpg (c) Our school bus (d) bus.jpg -
15.🔍 Which line is missing its closing tag?
line 1: <u>The red kite
line 2: <em>My pets</em>
line 3: <h2>Good morning!</h2> (a) line 3 (b) line 2 (c) line 1 - 16.True or false: <ul> goes in the body. (a) False (b) True
- 17.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 18.🌐 Which one is where we type code? (a) a code editor (b) a web browser (c) a web server
- 19.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) an attribute (d) a comment
- 20.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h2>? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
- 21.True or false: a web server opens web pages for us. (a) True (b) False
-
22.📋 What number does the browser show next to “Mango”?
<ol start="7">
<li>Banana</li>
<li>Litchi</li>
<li>Guava</li>
<li>Grapes</li>
<li>Orange</li>
<li>Mango</li>
</ol> -
23.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Kites fly high<br>Sky is blue</p> -
24.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Good morning!</p> -->
<p>Our school trip</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) The red kite (c) Our school trip (d) Good morning! - 25.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
- 26.Which of these is true of a web browser? (a) shows line numbers (b) stores a website’s files (c) opens web pages for us (d) answers page requests
- 27.True or false: <li> is one item of a list. (a) False (b) True
- 28.True or false: a web browser saves our .html files. (a) False (b) True
- 29.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 30.True or false: in <img>, src sets how tall it is. (a) False (b) True
-
31.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>The red kite</h2>
<p>The red kite</p>
<p>My best friend</p>
<p>Hello, world!</p>
<p>Good morning!</p> -
32.🔗 Which address opens when you click this link?
<a href="https://example.com">School news</a> (a) maths.html (b) School news (c) https://example.com (d) art.html -
33.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p>
<p>Hello, world!</p> (a) Hello, world! (b) I love mangoes. (c) Good morning! - 34.💬 How does an HTML comment end? (a) >> (b) */ (c) // (d) -->
-
35.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Banana</li>
<li>Jamun</li>
</ol> - 36.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 37.🖼️ Which attribute of <img> describes the picture? (a) width (b) height (c) alt (d) src
-
38.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Rain today</p>
<h4>Our school trip</h4>
<h2>I love mangoes.</h2>
<p>Our school trip</p> -
39.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>The red kite</p> -->
<p>My best friend</p>
<!-- <p>Cricket is fun.</p> --> - 40.📝 What does <p> make? (a) a link (b) a picture (c) a table (d) a paragraph
Answer key
- Rain today
- Art corner
- in a new tab
- in a new tab
- <h1>
- Markup
- contact.html
- Yes
- <h1>
- Language
- kite.png
- turns HTML into a page
- 3
- bus.jpg
- line 1
- True
- Yes
- a code editor
- an attribute
- <h1>
- False
- 12
- 4
- Good morning!
- in the body
- opens web pages for us
- True
- False
- Yes
- False
- 5
- https://example.com
- I love mangoes.
- -->
- 3
- a closing tag
- alt
- 3
- 1
- a paragraph
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids