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