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