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