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