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