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