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