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