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