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