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