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