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 best friend</p>
<p>My pets</p>
<h2>Our school trip</h2> -
2.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="300"> (a) A red kite (b) width (c) kite.png (d) Map of India - 3.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
4.🔍 Which line is missing its closing tag?
line 1: <b>Fun facts
line 2: <h2>I love mangoes.</h2>
line 3: <h1>Hello, world!</h1> (a) line 3 (b) line 2 (c) line 1 - 5.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
-
6.🔍 Which line is missing its closing tag?
line 1: <h1>My pets</h1>
line 2: <em>Our school trip</em>
line 3: <u>Hello, world! (a) line 3 (b) line 2 (c) line 1 - 7.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) height (d) width
-
8.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>My best friend</p> -->
<p>Good morning!</p> (a) My best friend (b) Good morning! (c) My pets -
9.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Rivers flow<br>Stars shine</p> -
10.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>The red kite</p>
<p>Rain today</p> (a) The red kite (b) Rain today (c) My pets -
11.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>My pets</p>
<p>Good morning!</p>
<p>Cricket is fun.</p>
<p>My best friend</p> -
12.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Rain today</p>
<p>My pets</p>
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> --> - 13.True or false: HTML on its own can add up two numbers. (a) True (b) False
-
14.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="150"> (a) A red kite (b) Map of India (c) kite.png (d) width - 15.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
-
16.🔍 Which line is missing its closing tag?
line 1: <h2>Rain today
line 2: <strong>Fun facts</strong>
line 3: <u>My pets</u> (a) line 2 (b) line 3 (c) line 1 - 17.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
-
18.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Good morning!</p> -->
<p>Rain today</p>
<p>Hello, world!</p> (a) Hello, world! (b) Rain today (c) Good morning! (d) Our school trip - 19.💬 Does the browser show comments on the page? (a) Yes (b) No
- 20.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h1>? (a) <h1> (b) <h5> (c) <h4> (d) <h2>
-
21.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="250"> (a) The full moon (b) fort.jpg (c) bus.jpg (d) moon.png -
22.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Roses are red</p> -
23.🔗 Which words do you click on?
<a href="maths.html">Art corner</a> (a) maths.html (b) School news (c) href (d) Art corner - 24.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h6> or <h5>? (a) <h1> (b) <h5> (c) <h6> (d) <h4>
- 25.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
-
26.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) moon.png (b) A happy dog (c) dog.jpg (d) bus.jpg - 27.True or false: in <img>, alt names the picture file. (a) False (b) True
-
28.📋 What number does the browser show next to “Mango”?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Papaya</li>
<li>Guava</li>
<li>Banana</li>
</ol> - 29.📝 What does <p> make? (a) a link (b) a table (c) a picture (d) a paragraph
- 30.🖼️ Which attribute of <img> tells which image to load? (a) src (b) width (c) height (d) alt
- 31.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h4>? (a) <h4> (b) <h5> (c) <h3> (d) <h2>
-
32.🔍 Which line is missing its closing tag?
line 1: <h1>My pets</h1>
line 2: <small>The red kite</small>
line 3: <b>Cricket is fun. (a) line 1 (b) line 3 (c) line 2 -
33.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Kites fly high<br>Roses are red<br>Sky is blue<br>Birds sing</p> - 34.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
-
35.🔍 Which line is missing its closing tag?
line 1: <h2>Good morning!</h2>
line 2: <u>Our school trip</u>
line 3: <p>The red kite (a) line 1 (b) line 3 (c) line 2 - 36.📄 Can HTML on its own make links to pages? (a) No (b) Yes
- 37.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
38.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h3>Good morning!</h3>
<h2>I love mangoes.</h2>
<h3>Our school trip</h3>
<p>Cricket is fun.</p> - 39.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
- 40.🔠 Are headings shown in bold by default? (a) No (b) Yes
Answer key
- 2
- A red kite
- Yes
- line 1
- Yes
- line 3
- width
- My best friend
- 4
- My pets
- 4
- 3
- False
- A red kite
- a code editor
- line 1
- <h5>
- Good morning!
- No
- <h1>
- moon.png
- 2
- Art corner
- <h1>
- a web server
- dog.jpg
- False
- 2
- a paragraph
- src
- <h5>
- line 3
- 5
- <ul>
- line 3
- Yes
- a closing tag
- 4
- 1
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids