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