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