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