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