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