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