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 one colours code to help us? (a) a web browser (b) a code editor (c) a web server
- 2.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 3.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
- 4.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
- 5.True or false: <style> goes in the body. (a) True (b) False
- 6.📄 Can HTML on its own pick a random number? (a) Yes (b) No
- 7.🔢 In a basic web page file, which comes first: “<html>” or “</html>”? (a) </html> (b) <html>
-
8.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Hello, world!</p>
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> --> (a) Hello, world! (b) My best friend (c) I love mangoes. (d) Cricket is fun. - 9.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 10.📝 What does <p> make? (a) a link (b) a picture (c) a paragraph (d) a table
-
11.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Rain today</p>
<p>Cricket is fun.</p>
<p>Rain today</p>
<p>I love mangoes.</p> - 12.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h5> or <h1>? (a) <h2> (b) <h4> (c) <h5> (d) <h1>
-
13.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>I love mangoes.</p>
<h3>My pets</h3>
<h2>I love mangoes.</h2>
<h2>The red kite</h2> - 14.True or false: a web server has an address bar. (a) False (b) True
- 15.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 16.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 17.True or false: <p> is an empty tag. (a) False (b) True
- 18.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
- 19.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h5>? (a) <h2> (b) <h6> (c) <h1> (d) <h5>
- 20.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
-
21.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<p>My best friend</p> - 22.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
23.📋 What number does the browser show next to “Orange”?
<ol start="9">
<li>Jamun</li>
<li>Mango</li>
<li>Orange</li>
</ol> - 24.Which of these is true of a web server? (a) saves our .html files (b) stores a website’s files (c) shows pages from the web (d) is where we type code
-
25.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>My best friend</p>
<p>Good morning!</p> - 26.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
27.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="250"> (a) A red kite (b) kite.png (c) map.png (d) cake.jpg -
28.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) About us (b) href (c) games.html (d) Play games -
29.📋 What number does the browser show next to “Guava”?
<ol start="6">
<li>Papaya</li>
<li>Jamun</li>
<li>Guava</li>
</ol> - 30.Which of these is a closing tag? (a) <b> (b) </h1> (c) <li> (d) <h1>
- 31.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
- 32.True or false: <h1> goes in the body. (a) True (b) False
- 33.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 34.💾 A web page file usually ends with which extension? (a) .html (b) .txt (c) .png (d) .mp3
-
35.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Fun facts</p>
<p>My best friend</p>
<p>Cricket is fun.</p> - 36.True or false: <ul> is an ordered list. (a) True (b) False
- 37.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 38.🔍 Which is the odd one out? (a) opens web pages for us (b) sends pages over the net (c) has an address bar (d) shows pages from the web
-
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="300"> (a) fort.jpg (b) width (c) An old fort (d) A tiger asleep - 40.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <ol> (d) <hr>
Answer key
- a code editor
- Yes
- <!--
- a web browser
- False
- No
- <html>
- I love mangoes.
- in the head
- a paragraph
- 1
- <h5>
- 4
- False
- an opening tag
- True
- False
- 1
- <h6>
- <img>
- 2
- an empty tag
- 11
- stores a website’s files
- 3
- has a closing tag
- kite.png
- Play games
- 8
- </h1>
- <h5>
- True
- in the body
- .html
- 4
- False
- in the head
- sends pages over the net
- An old fort
- <ul>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids