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