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