CHAPTER 09
Beginner
HTML Comments, Entities, and Symbols
Updated: May 10, 2026
5 min read
# HTML Comments, Entities, and Symbols
1. Introduction
Sometimes you need to write notes in your code that the browser shouldn't display. Sometimes you need to display special characters (like<, >, or &) that HTML might confuse for code. In this chapter, we cover Comments and Entities.
2. Learning Objectives
- Write invisible comments in your HTML code.
- Display reserved characters using HTML Entities.
- Render special symbols like Copyright and Currency.
3. Detailed Explanations
HTML Comments
Comments are completely ignored by the browser. They are used to leave notes for yourself or other developers. They start with<!-- and end with -->.
html
HTML Entities (Reserved Characters)
If you want to display the< or > symbols on your website, you can't just type them, because HTML thinks you are starting a tag! Instead, you use Entities.
Entities start with an ampersand & and end with a semicolon ;.
html
Common Reserved Entities:
-
Less than
<=<
-
Greater than
>=>
-
Ampersand
&=&
-
Double quote
"="
Special Symbols
Entities are also used for symbols that aren't easily found on a keyboard.
html
Non-Breaking Space
Normally, HTML collapses multiple spaces into one. If you want to force an extra space, use the non-breaking space entity .
html
4. Mini Project: Pricing Page Footer
html
5. MCQs
Q1: How do you write a comment in HTML? A)// This is a comment
B) /* This is a comment */
C) <!-- This is a comment -->
D) <! This is a comment !>
*Answer: C*
6. Summary
Comments are your best friend for organizing large files. Entities ensure your text renders correctly without breaking the HTML parser, and they provide an easy way to inject professional symbols like© into your web pages.