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