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