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>Rain today</p>
<!-- <p>My pets</p> -->
<p>The red kite</p>
<p>Hello, world!</p>
<p>Fun facts</p> -
2.💬 Which text will NOT show on the page?
<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 -
3.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>My best friend</p>
<p>Good morning!</p>
<!-- <p>Hello, world!</p> --> - 4.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
5.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>The red kite</p>
<!-- <p>My pets</p> --> (a) The red kite (b) Our school trip (c) My pets -
6.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<p>Good morning!</p>
<p>My pets</p> (a) My pets (b) The red kite (c) Our school trip (d) Good morning! -
7.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Good morning!</p> --> -
8.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>The red kite</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Rain today</p> -
9.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<p>Cricket is fun.</p> -
10.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Rain today</p> -->
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p> -
11.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>My pets</p> - 12.💬 How does an HTML comment end? (a) // (b) --> (c) */ (d) >>
-
13.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Rain today</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>I love mangoes.</p> --> -
14.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>The red kite</p> -->
<p>Hello, world!</p> -
15.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>My pets</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p> -
16.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Good morning!</p>
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p> (a) Good morning! (b) I love mangoes. (c) Rain today (d) My pets -
17.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> --> -
18.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>Rain today</p>
<p>Hello, world!</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) Hello, world! (c) Fun facts (d) Rain today -
19.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p> -
20.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>Hello, world!</p>
<p>My best friend</p>
<!-- <p>The red kite</p> -->
<p>Fun facts</p> -
21.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Our school trip</p>
<p>My pets</p> -
22.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p> -
23.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p>
<p>My pets</p>
<p>Fun facts</p> (a) Cricket is fun. (b) The red kite (c) My pets (d) Fun facts -
24.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Hello, world!</p>
<!-- <p>Good morning!</p> --> (a) I love mangoes. (b) Good morning! (c) Hello, world! -
25.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>My best friend</p>
<p>Fun facts</p>
<!-- <p>The red kite</p> --> (a) I love mangoes. (b) Fun facts (c) The red kite (d) My best friend -
26.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> --> - 27.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
-
28.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>Rain today</p> -->
<!-- <p>The red kite</p> --> -
29.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Our school trip</p>
<p>Fun facts</p> (a) Our school trip (b) Fun facts (c) Good morning! - 30.💬 Does the browser show comments on the page? (a) Yes (b) No
-
31.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<p>Fun facts</p>
<!-- <p>My best friend</p> --> -
32.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<p>My pets</p>
<p>Cricket is fun.</p> -
33.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<p>Fun facts</p>
<p>I love mangoes.</p> -
34.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>I love mangoes.</p>
<p>Fun facts</p>
<!-- <p>My best friend</p> --> (a) Good morning! (b) My best friend (c) I love mangoes. (d) Fun facts -
35.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>I love mangoes.</p>
<p>The red kite</p>
<!-- <p>Good morning!</p> -->
<p>Fun facts</p> -
36.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>Rain today</p> -->
<p>Hello, world!</p> -
37.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p>
<p>Our school trip</p> (a) Hello, world! (b) Our school trip (c) Good morning! -
38.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p>
<p>Our school trip</p>
<p>The red kite</p> -
39.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>I love mangoes.</p>
<p>Fun facts</p>
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p> -
40.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<p>Our school trip</p>
Answer key
- 4
- My pets
- 3
- Yes
- My pets
- The red kite
- 1
- 3
- 2
- 1
- 2
- -->
- 1
- 2
- 1
- Rain today
- 2
- Fun facts
- 1
- 4
- 2
- 1
- The red kite
- Good morning!
- The red kite
- 2
- <!--
- 1
- Good morning!
- No
- 3
- 3
- 3
- My best friend
- 4
- 2
- Hello, world!
- 3
- 4
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids