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