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