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