HTML entities are used to display reserved characters in HTML.
Some characters are reserved in HTML (like < and
>) because the browser interprets them as tags. To
display these characters, we must use their *entity name* or *entity
number*.
| Character | Description | Entity Name |
|---|---|---|
| < | Less than | < |
| > | Greater than | > |
| & | Ampersand | & |
| " | Double quote | " |
| ' | Single quote | ' |
| Non-breaking space | |
|
| © | Copyright | © |
<p>5 < 10</p>
<p>10 > 5</p>
<p>Tom & Jerry</p>
5 < 10
10 > 5
Tom & Jerry
<p>Hello World!</p>
Hello World!
<p>© 2024 Your Company Name</p>
© 2024 Your Company Name