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