HTML Entities
Complete reference for special characters in HTML
About HTML Entities
HTML entities are used to display reserved characters and symbols that either aren't available on keyboards or have special meaning in HTML. They begin with an ampersand (&
) and end with a semicolon (;
).
Reserved Characters
Special Symbols
Diacritical Marks
HTML Entity Syntax
Entity Formats
HTML entities can be represented in several ways:
- Named entities:
&name;
Example:©
becomes © - Decimal numeric entities:
&#number;
Example:©
becomes © - Hexadecimal numeric entities:
&#xHex;
Example:©
becomes ©
<!-- Named entity -->
<p>Copyright © 2023</p>
<!-- Decimal entity -->
<p>Copyright © 2023</p>
<!-- Hexadecimal entity -->
<p>Copyright © 2023</p>
<!-- All display as: Copyright © 2023 -->
When to Use Entities
HTML entities are essential for:
- Displaying reserved HTML characters (<, >, &, etc.)
- Showing characters not on your keyboard (©, €, etc.)
- Ensuring proper rendering across different encodings
- Adding invisible characters (non-breaking spaces)
- Displaying mathematical and scientific notation
- Showing accented and special characters
Important: Always declare <meta charset="UTF-8">
in your HTML to ensure proper character rendering.
Reserved Characters
Name | Entity Name | Entity Number | Symbol | Description | Action |
---|---|---|---|---|---|
Ampersand | & | & | & | Must be escaped in HTML | |
Less Than | < | < | < | Starts HTML tags | |
Greater Than | > | > | > | Ends HTML tags | |
Double Quote | " | " | " | For attribute values | |
Single Quote | ' | ' | ' | Alternative for attributes |
Common Symbols
Name | Entity Name | Entity Number | Symbol | Description | Action |
---|---|---|---|---|---|
Non-breaking Space | |   | Prevents line breaks | ||
Copyright | © | © | © | Copyright symbol | |
Registered Trademark | ® | ® | ® | Registered mark | |
Trademark | ™ | ™ | ™ | Trademark symbol | |
Euro | € | € | € | Euro currency | |
Pound | £ | £ | £ | British pound |
Mathematical Symbols
Name | Entity Name | Entity Number | Symbol | Description | Action |
---|---|---|---|---|---|
Plus | + | + | + | Addition | |
Minus | − | − | - | Subtraction | |
Multiplication | × | × | × | Multiply | |
Division | ÷ | ÷ | ÷ | Divide | |
Equals | = | = | = | Equality | |
Not Equal | ≠ | ≠ | ≠ | Inequality |
Accented Characters
Name | Entity Name | Entity Number | Symbol | Description | Action |
---|---|---|---|---|---|
A acute | á | á | á | Latin small a with acute | |
E grave | è | è | è | Latin small e with grave | |
I circumflex | î | î | î | Latin small i with circumflex | |
O tilde | õ | õ | õ | Latin small o with tilde | |
U umlaut | ü | ü | ü | Latin small u with diaeresis | |
C cedilla | ç | ç | ç | Latin small c with cedilla |
Greek Letters
Name | Entity Name | Entity Number | Symbol | Description | Action |
---|---|---|---|---|---|
Alpha | α | α | α | Greek small alpha | |
Beta | β | β | β | Greek small beta | |
Gamma | γ | γ | γ | Greek small gamma | |
Delta | δ | δ | δ | Greek small delta | |
Pi | π | π | π | Greek small pi | |
Omega | ω | ω | ω | Greek small omega |
Entity Usage Best Practices
Do's:
- Always escape reserved HTML characters (<, >, &, ", ')
- Use named entities when available for better readability
- Use numeric entities for obscure or less common characters
- Declare UTF-8 character encoding in your HTML
- Test entities in different browsers and devices
- Consider accessibility when using symbolic entities
Don'ts:
- Don't copy-paste special characters directly (use entities)
- Avoid using entities for styling (use CSS instead)
- Don't overuse non-breaking spaces for layout
- Avoid mixing entity formats unnecessarily
- Don't forget to close entities with semicolons
- Avoid using obscure entities that may not render consistently
Try Our HTML Entities Editor
Experiment with HTML entities in our interactive editor:
- Test different entity formats
- See how entities render in real-time
- Practice escaping reserved characters
- Experiment with mathematical notation
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<!-- Reserved characters -->
<p><div> & "</p>
<!-- Common symbols -->
<p>© ® ™</p>
<!-- Currency -->
<p>€ £ ¥</p>
<!-- Math -->
<p>π √ ∞</p>
<!-- Accents -->
<p>é ñ ü</p>
</body>
</html>