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