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