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