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.🔗 Where does this link open?
<a href="maths.html" target="_blank">Maths fun</a> (a) in a new tab (b) in the same tab - 2.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
- 3.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 4.🌍 Which program shows a web page to us? (a) a music player (b) a web browser (c) a paint program (d) a calculator
- 5.📝 What does <hr> draw? (a) a link (b) a picture (c) a line across the page (d) a table
- 6.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a href="about.html"> (d) <a alt="about.html">
- 7.💬 Does the browser show comments on the page? (a) No (b) Yes
- 8.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
- 9.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
- 10.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a dot (d) as a new line
- 11.🏷️ HTML marks up text using ___. (a) keys (b) pixels (c) tags (d) wires
-
12.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine</p> - 13.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small> (d) <small/>
-
14.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> (a) map.png (b) tiger.jpg (c) A tiger asleep (d) kite.png - 15.True or false: <ul> shows 1, 2, 3 numbers. (a) False (b) True
- 16.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 17.True or false: HTML on its own can make links to pages. (a) True (b) False
- 18.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
-
19.🔍 One closing tag is missing. Which one?
<u>Fun facts</u>
<b>My best friend
<h3>I love mangoes.</h3> (a) </u> (b) </b> (c) </h3> (d) </h2> -
20.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My best friend</p> -->
<!-- <p>The red kite</p> -->
<p>Our school trip</p> -
21.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Hello, world!</p>
<!-- <p>The red kite</p> -->
<p>Rain today</p> (a) I love mangoes. (b) The red kite (c) Hello, world! (d) Rain today -
22.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Litchi</li>
<li>Grapes</li>
<li>Guava</li>
<li>Papaya</li>
<li>Orange</li>
<li>Banana</li>
</ol> - 23.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h2>? (a) <h5> (b) <h6> (c) <h1> (d) <h2>
- 24.True or false: <p> has a closing tag. (a) False (b) True
- 25.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
- 26.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) answers page requests (d) is where we type code
-
27.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Banana</li>
<li>Litchi</li>
<li>Guava</li>
<li>Jamun</li>
<li>Orange</li>
</ol> - 28.True or false: <input> has a closing tag. (a) True (b) False
-
29.🔍 One closing tag is missing. Which one?
<em>I love mangoes.</em>
<b>Fun facts
<i>Our school trip</i> (a) </u> (b) </i> (c) </em> (d) </b> - 30.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h4>? (a) <h3> (b) <h1> (c) <h5> (d) <h4>
- 31.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 32.Which of these has a closing tag? (a) <img> (b) <hr> (c) <br> (d) <p>
- 33.🔤 In “HTML”, what does the L stand for? (a) Line (b) Language (c) Laptop (d) Link
- 34.📄 Can HTML on its own pick a random number? (a) No (b) Yes
- 35.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
-
36.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
<p>Our school trip</p> -
37.🔍 One closing tag is missing. Which one?
<p>Our school trip</p>
<b>My best friend</b>
<h3>My pets (a) </p> (b) </h3> (c) </b> (d) </u> -
38.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>My pets</h2>
<p>Rain today</p> - 39.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 40.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
Answer key
- in a new tab
- Yes
- Yes
- a web browser
- a line across the page
- <a href="about.html">
- No
- <a>
- a code editor
- as one space
- tags
- 2
- </small>
- tiger.jpg
- False
- Yes
- True
- in the body
- </b>
- 1
- The red kite
- 2
- <h1>
- True
- <ol>
- answers page requests
- 6
- False
- </b>
- <h5>
- an opening tag
- <p>
- Language
- No
- opens it in a new tab
- 2
- </h3>
- 2
- has a closing tag
- an empty tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids