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