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