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