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