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