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