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