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