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