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