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