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