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