HTML Worksheet: Comments
Code tip (Hidden notes): A comment is <!-- note -->: it starts with <!-- and ends with -->. Anything inside a comment, even a whole <p>, is not shown. Comments can be read with “view source” — never put secrets in them.
NameDateTime takenScore ___ / 40
-
1.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>My pets</p> -->
<p>Hello, world!</p> -
2.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>Our school trip</p>
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> --> -
3.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<p>My best friend</p> -
4.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Rain today</p>
<p>My pets</p>
<p>I love mangoes.</p> -
5.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Fun facts</p> -->
<p>The red kite</p> -
6.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p>
<p>Hello, world!</p>
<p>Rain today</p> (a) Hello, world! (b) Rain today (c) My best friend (d) I love mangoes. - 7.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
- 8.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
- 9.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
-
10.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>My best friend</p>
<!-- <p>The red kite</p> --> -
11.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<p>Good morning!</p> -
12.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>Fun facts</p>
<!-- <p>Rain today</p> -->
<!-- <p>Our school trip</p> --> -
13.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Hello, world!</p>
<p>I love mangoes.</p> (a) Hello, world! (b) My pets (c) I love mangoes. - 14.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
15.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>The red kite</p>
<p>Hello, world!</p> (a) The red kite (b) Our school trip (c) Hello, world! -
16.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Rain today</p>
<!-- <p>Good morning!</p> -->
<p>My pets</p>
<!-- <p>Cricket is fun.</p> --> -
17.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Fun facts</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
<!-- <p>Our school trip</p> --> -
18.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>Our school trip</p> -
19.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<p>Hello, world!</p> (a) My pets (b) Hello, world! (c) I love mangoes. -
20.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>My best friend</p>
<!-- <p>The red kite</p> --> -
21.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> -->
<!-- <p>I love mangoes.</p> --> -
22.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>My pets</p>
<p>My best friend</p> (a) My best friend (b) Good morning! (c) My pets -
23.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p>
<!-- <p>Our school trip</p> --> -
24.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>The red kite</p> (a) Cricket is fun. (b) My pets (c) The red kite (d) I love mangoes. -
25.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Fun facts</p>
<p>I love mangoes.</p> -
26.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) Hello, world! (c) Good morning! (d) Cricket is fun. -
27.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p>
<p>Fun facts</p> (a) Good morning! (b) Fun facts (c) I love mangoes. -
28.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<!-- <p>My best friend</p> -->
<p>My pets</p> -
29.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>My pets</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<!-- <p>My best friend</p> --> -
30.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> -->
<p>Rain today</p> -
31.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Fun facts</p>
<p>I love mangoes.</p>
<p>My best friend</p> -
32.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>I love mangoes.</p> -->
<p>My pets</p>
<p>Our school trip</p> (a) My pets (b) I love mangoes. (c) Our school trip (d) Good morning! -
33.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p>
<p>My best friend</p> (a) My best friend (b) Cricket is fun. (c) I love mangoes. -
34.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p>
<p>Good morning!</p>
<p>My pets</p> (a) My pets (b) Good morning! (c) I love mangoes. (d) Our school trip -
35.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>Fun facts</p> -->
<p>The red kite</p>
<p>I love mangoes.</p> (a) The red kite (b) Cricket is fun. (c) I love mangoes. (d) Fun facts -
36.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p> (a) Hello, world! (b) Fun facts (c) Cricket is fun. -
37.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Fun facts</p>
<!-- <p>My best friend</p> -->
<p>My pets</p> (a) Fun facts (b) My best friend (c) The red kite (d) My pets -
38.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>My pets</p> -->
<!-- <p>Rain today</p> --> -
39.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>The red kite</p>
<!-- <p>My best friend</p> -->
<p>Rain today</p> -
40.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Good morning!</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>Cricket is fun.</p> -->
Answer key
- 2
- 3
- 2
- 3
- 2
- My best friend
- -->
- <!--
- to leave notes
- 2
- 3
- 2
- My pets
- Yes
- Our school trip
- 2
- 1
- 3
- My pets
- 1
- 1
- Good morning!
- 1
- My pets
- 2
- Good morning!
- I love mangoes.
- 2
- 1
- 2
- 3
- I love mangoes.
- I love mangoes.
- Our school trip
- Fun facts
- Cricket is fun.
- My best friend
- 1
- 3
- 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids