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