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