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