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