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