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