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