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