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