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