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