HTML Entities
HTML entities are special principle used to display reserved characters or
symbols in HTML. They start with & and end with
;. For
example, if you want to display < or > in your web
web page, you can not
just class them directly because they're used in HTML tags. rather, you use HTML
entities.
Why Use entities?
- To display reserved characters like
<,>,&,",', etc. - To display characters not set up on the keyboard (©, ®, €, etc.).
- To write safe and valid HTML.
Common HTML Entities Table
| Character | Reality Name | Entity Code |
|---|---|---|
| < | less than | < |
| > | greater than | > |
| & | ampersand | & |
| " | quotation mark | " |
| ' | apostrophe | ' |
| © | copyright | © |
| ® | registered trademark | ® |
| € | euro | € |
| non-breaking space | |
|
| ₹ | Indian Rupee Symbol | ₹ |
Emojies Entities
| Emoji | HTML Entity |
|---|---|
| 😀 | 😀 |
| 😁 | 😁 |
| 😂 | 😂 |
| 😃 | 😃 |
| 😄 | 😄 |
| 😅 | 😅 |
| 😆 | 😆 |
| 😇 | 😇 |
| 😈 | 😈 |
| 😉 | 😉 |
| 😊 | 😊 |
| 😋 | 😋 |
| 😌 | 😌 |
| 😍 | 😍 |
| 😎 | 😎 |
| 😏 | 😏 |
| 😐 | 😐 |
| 😑 | 😑 |
| 😒 | 😒 |
| 😓 | 😔 |
Example Operation
<h1>Use <h1> for headlines.</h1>
<p>Brand © 2025 by MK_Coder</p>
Preview :
(This image here showing the text "Use <h1> for headlines." as an h1 heading, and below it the text "Brand © 2025 by MK_Coder" as a paragraph.)
“ Entities allow HTML to speak the language of symbols. ”