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.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>I love mangoes.</p>
<p>My best friend</p> - 2.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
3.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Sky is blue<br>Rivers flow</p> -
4.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>Our school trip</p>
<!-- <p>Fun facts</p> --> - 5.Which of these is an empty tag? (a) <title> (b) <input> (c) <b> (d) <p>
- 6.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 10 (c) 6 (d) 3
- 7.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .txt (d) .html
- 8.Which of these is true of a web server? (a) hosts websites online (b) shows line numbers (c) turns HTML into a page (d) opens web pages for us
-
9.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> --> - 10.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Link (d) Language
-
11.🔗 Which address opens when you click this link?
<a href="news.html">Contact us</a> (a) games.html (b) quiz.html (c) news.html (d) Contact us -
12.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>My best friend</p>
<p>Our school trip</p> (a) Our school trip (b) My best friend (c) Hello, world! - 13.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
-
14.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>My pets</p>
<h2>The red kite</h2>
<p>The red kite</p> -
15.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>My best friend</h3>
<p>Cricket is fun.</p>
<h2>Our school trip</h2> - 16.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) src (c) width (d) alt
- 17.True or false: <li> is an ordered list. (a) True (b) False
-
18.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing</p> -
19.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="300"> -
20.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<p>Rain today</p>
<p>Cricket is fun.</p> (a) Rain today (b) I love mangoes. (c) My pets (d) Cricket is fun. -
21.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>I love mangoes.</h2>
<p>My best friend</p>
<h4>Good morning!</h4>
<p>My pets</p> -
22.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Our school trip</p>
<p>Hello, world!</p>
<h2>Hello, world!</h2>
<p>The red kite</p>
<p>My pets</p> - 23.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
- 24.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
-
25.🔍 One closing tag is missing. Which one?
<b>Hello, world!</b>
<i>Our school trip
<h3>The red kite</h3> (a) </p> (b) </b> (c) </i> (d) </h3> - 26.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
-
27.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>My best friend</p> -->
<!-- <p>Good morning!</p> -->
<p>Fun facts</p>
<!-- <p>The red kite</p> --> -
28.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Rain today</p> -->
<!-- <p>Our school trip</p> --> -
29.🔗 Where does this link open?
<a href="about.html">School news</a> (a) in a new tab (b) in the same tab - 30.True or false: a web server is where we type code. (a) True (b) False
- 31.True or false: <b> is an empty tag. (a) True (b) False
- 32.Which of these is true of a web browser? (a) hosts websites online (b) shows line numbers (c) stores a website’s files (d) opens web pages for us
- 33.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
- 34.True or false: HTML on its own can add pictures to a page. (a) True (b) False
-
35.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Papaya</li>
<li>Banana</li>
<li>Guava</li>
<li>Grapes</li>
<li>Mango</li>
</ol> -
36.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>The red kite</p>
<!-- <p>Fun facts</p> -->
<!-- <p>Hello, world!</p> --> -
37.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow<br>Kites fly high<br>Roses are red</p> -
38.🔍 One closing tag is missing. Which one?
<h1>I love mangoes.
<p>Hello, world!</p>
<b>Our school trip</b> (a) </p> (b) </strong> (c) </h1> (d) </b> - 39.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
- 40.True or false: <title> goes in the head. (a) False (b) True
Answer key
- 3
- Yes
- 4
- 2
- <input>
- 1
- .html
- hosts websites online
- 1
- Language
- news.html
- Hello, world!
- <a href="about.html">
- 4
- 3
- alt
- False
- 2
- 300
- My pets
- 3
- 5
- href
- <!--
- </i>
- <li>
- 1
- 1
- in the same tab
- False
- False
- opens web pages for us
- True
- True
- 6
- 1
- 4
- </h1>
- <a>
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids