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