HTML Symbols
HTML Entities and Symbols
Section titled “HTML Entities and Symbols”Using Special Characters in HTML
Section titled “Using Special Characters in HTML”Sometimes you need to display characters that are not readily available on a standard keyboard (like ©, €, ♥) or characters that have special meaning in HTML itself (like <, >, &).
HTML provides mechanisms called entities to represent these characters.
There are two main ways to use entities:
- Entity Names: Human-readable codes like
©for © or<for <. These are easier to remember but only exist for commonly used characters. - Entity Numbers (Character References): Use the character’s Unicode number, either in decimal (
©for ©) or hexadecimal (©for ©). These can represent any Unicode character.
Using entities ensures that symbols display correctly regardless of the page’s character encoding, although using UTF-8 encoding for your HTML document is the modern standard and allows many symbols to be used directly in the source code.
| Best Practice | Always declare your character encoding as UTF-8 in the <head> section: <meta charset="UTF-8">. This allows direct use of many symbols. Use entities primarily for characters that conflict with HTML syntax (<, >, &, ") or are difficult to type. |
|---|
Example:
<p>The less-than sign: <</p><p>The greater-than sign: ></p><p>The ampersand sign: &</p><p>The copyright symbol: © or ©</p><p>The Euro symbol: € or €</p><p>A heart symbol: ♥ or ♥ (or directly ♡ if using UTF-8)</p>Commonly Used Entities
Section titled “Commonly Used Entities”Reserved Characters:
| Character | Entity Name | Entity Number | Description |
|---|---|---|---|
| < | < | < | Less than |
| > | > | > | Greater than |
| & | & | & | Ampersand |
| " | " | " | Double quotation mark |
| ' | ' | ' | Single quotation mark (apostrophe) |
Other Symbols:
| Character | Entity Name | Entity Number | Description |
|---|---|---|---|
| © | © | © | Copyright sign |
| ® | ® | ® | Registered trademark sign |
| ™ | ™ | ™ | Trademark sign |
| € | € | € | Euro sign |
| £ | £ | £ | Pound sign |
| ¥ | ¥ | ¥ | Yen sign |
| Non-breaking space |
The non-breaking space ( ) is particularly useful when you want to prevent a line break between two words or elements.
Mathematical Symbols
Section titled “Mathematical Symbols”HTML entities can represent many mathematical symbols:
| Char | Entity Name | Number | Description |
|---|---|---|---|
| ∀ | ∀ | ∀ | For All |
| ∂ | ∂ | ∂ | Partial Differential |
| ∃ | ∃ | ∃ | There Exists |
| ∅ | ∅ | ∅ | Empty Set |
| ∇ | ∇ | ∇ | Nabla (vector differential) |
| ∈ | ∈ | ∈ | Element Of |
| ∉ | ∉ | ∉ | Not an Element Of |
| ∋ | ∋ | ∋ | Contains as Member |
| ∏ | ∏ | ∏ | N-ary Product |
| ∑ | ∑ | ∑ | N-ary Summation |
| × | × | × | Multiplication Sign |
| ÷ | ÷ | ÷ | Division Sign |
Greek Letters
Section titled “Greek Letters”Capital and lowercase Greek letters are available:
| Char | Entity Name | Number | Description |
|---|---|---|---|
| Α | Α | Α | Greek Capital Alpha |
| Β | Β | Β | Greek Capital Beta |
| Γ | Γ | Γ | Greek Capital Gamma |
| Δ | Δ | Δ | Greek Capital Delta |
| α | α | α | Greek Small Alpha |
| β | β | β | Greek Small Beta |
| γ | γ | γ | Greek Small Gamma |
| δ | δ | δ | Greek Small Delta |
Finding More Symbols
Section titled “Finding More Symbols”There are thousands of characters defined in Unicode. You can find entity names or numbers using online resources:
- Search engines (e.g., search for “HTML entity for checkmark”)
- Comprehensive entity reference websites (like
amp-what.com) - The official Unicode character charts (more technical)
Remember, using UTF-8 encoding allows you to often paste the symbol directly into your HTML code.