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