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