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