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