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