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.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine<br>Birds sing<br>Sky is blue</p> - 2.💬 Does the browser show comments on the page? (a) No (b) Yes
- 3.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 4.Which of these goes in the body? (a) <p> (b) <link rel="stylesheet"> (c) <title> (d) <meta charset="utf-8">
- 5.Which of these is true of a code editor? (a) opens web pages for us (b) turns HTML into a page (c) has an address bar (d) colours code to help us
-
6.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Mango</li>
</ol> (a) bullets (b) numbers - 7.Which of these is an opening tag? (a) </h1> (b) </li> (c) <li> (d) </body>
- 8.True or false: <ul> shows bullet points. (a) True (b) False
-
9.🔍 One closing tag is missing. Which one?
<h2>I love mangoes.</h2>
<h1>Rain today
<p>My pets</p> (a) </p> (b) </em> (c) </h1> (d) </h2> - 10.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
-
11.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Orange</li>
<li>Grapes</li>
<li>Litchi</li>
</ul> -
12.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Good morning! (c) My pets - 13.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
14.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h4>Hello, world!</h4>
<p>Cricket is fun.</p>
<p>Our school trip</p>
<p>Fun facts</p> -
15.🔍 Which line is missing its closing tag?
line 1: <p>Our school trip</p>
line 2: <em>Rain today</em>
line 3: <u>Fun facts (a) line 1 (b) line 2 (c) line 3 - 16.True or false: <li> goes inside ul or ol. (a) True (b) False
- 17.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <h1> (d) <br>
-
18.🔗 Which words do you click on?
<a href="contact.html">Art corner</a> (a) href (b) Art corner (c) contact.html (d) School news - 19.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h4> or <h5>? (a) <h6> (b) <h1> (c) <h5> (d) <h4>
-
20.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p> - 21.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h6> or <h2>? (a) <h5> (b) <h1> (c) <h6> (d) <h2>
- 22.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
23.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p>
<!-- <p>My pets</p> --> -
24.🔍 Which line is missing its closing tag?
line 1: <strong>Our school trip
line 2: <i>My pets</i>
line 3: <h1>The red kite</h1> (a) line 3 (b) line 2 (c) line 1 - 25.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
-
26.🔍 One closing tag is missing. Which one?
<small>I love mangoes.
<h3>Hello, world!</h3>
<u>Cricket is fun.</u> (a) </h3> (b) </h2> (c) </u> (d) </small> -
27.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Hello, world!</p>
<p>My best friend</p>
<h3>Our school trip</h3>
<p>I love mangoes.</p> - 28.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
- 29.True or false: HTML on its own can show paragraphs. (a) False (b) True
-
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="300"> (a) width (b) A tiger asleep (c) An old fort (d) fort.jpg -
31.🔗 Which words do you click on?
<a href="https://example.com">Maths fun</a> (a) Maths fun (b) href (c) Art corner (d) https://example.com -
32.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>The red kite</p>
<h2>I love mangoes.</h2> - 33.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
-
34.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p>
<p>Fun facts</p>
<p>I love mangoes.</p>
<!-- <p>My best friend</p> --> - 35.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h6> or <h3>? (a) <h3> (b) <h6> (c) <h4> (d) <h2>
- 36.True or false: HTML on its own cannot make headings. (a) False (b) True
- 37.📄 Can HTML on its own make tables? (a) No (b) Yes
-
38.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Banana</li>
</ol> -
39.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Hello, world!</p>
<h2>Rain today</h2>
<p>Good morning!</p>
<p>Good morning!</p> - 40.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
Answer key
- 4
- No
- an opening tag
- <p>
- colours code to help us
- numbers
- <li>
- True
- </h1>
- to leave notes
- 4
- My pets
- Yes
- 2
- line 3
- True
- <h1>
- Art corner
- <h1>
- 1
- <h6>
- Yes
- 1
- line 1
- a web browser
- </small>
- 2
- <a href="about.html">
- True
- An old fort
- Maths fun
- 2
- a web browser
- 3
- <h2>
- False
- Yes
- 2
- 4
- <
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids