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