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