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