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