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