HTML Entities
HTML entities display reserved characters, invisible characters, and symbols not on a normal keyboard. Learn named, decimal, and hex references with examples.
There are a lot of symbols that are not present on a standard keyboard (mathematical, technical, currency symbols, etc.). Also, there are symbols that cannot be used because they can cause confusion. For example, we cannot use > because in HTML this symbol is parsed as a tag delimiter, and the browser won’t show it as text.
In HTML, entities display reserved characters, which can be confused with HTML code or invisible characters, like non-breaking spaces. They also represent characters that are difficult or impossible to type with a keyboard.
Every entity begins with an ampersand (&) and ends with a semicolon (;). The semicolon is required — without it, the browser may not recognize the entity at all.
Named, Decimal, and Hexadecimal References
There are three ways to write the same character. All three of the following produce an ampersand (&):
| Form | Syntax | Example for & |
|---|---|---|
| Named reference | &name; | & |
| Decimal numeric reference | &#number; | & |
| Hexadecimal numeric reference | &#xhex; | & |
A named reference (like &) is easy to read and remember, but only a fixed set of names is defined. A numeric reference can represent any Unicode character by its code point — decimal (&) or hexadecimal (&). The decimal 38 and the hex 26 are just two ways of writing the same code point. Numeric references are useful when no named entity exists for the character you need.
Entity names are case-sensitive: & works, but & does not.
For example:
<p>5 < 10 and 10 > 5</p>
<title>HTML entities & symbols</title>
<p>Snowman: ☃ or ☃</p>When Entities Are Required
You don't need to escape every special character — most can be typed directly. Entities are required only when a character would otherwise be parsed as markup, or when you need an invisible character that a normal space won't give you:
<— escapes<so the browser doesn't read it as the start of a tag.>— escapes>(recommended for symmetry, though it is only strictly required inside certain contexts).&— escapes&so it isn't read as the start of another entity."— escapes a double quote inside an attribute value that is itself wrapped in double quotes. — a non-breaking space, used to keep two words on the same line.
For instance, to keep a label and a year from being split across two lines, use a non-breaking space:
<p>Copyright 2024</p>The browser renders this as a normal space, but it will never wrap a line break between "Copyright" and "2024".
With <meta charset="UTF-8"> declared, your page can store characters directly. That means most named entities for accented or non-English letters — é (é), ü (ü), ñ (ñ) — are unnecessary: you can just type é, ü, or ñ in the source. Reserve entities for the reserved markup characters (<, >, &, ") and for invisible or hard-to-type symbols. See HTML Character Sets for more on encoding.
Character Entities Commonly Used in HTML
| Result | Description | Entity Name | Entity Number |
|---|---|---|---|
| non-breaking space | |   | |
| < | less than | < | < |
| > | greater than | > | > |
| & | ampersand | & | & |
| ¢ | cent | ¢ | ¢ |
| £ | pound | £ | £ |
| ¥ | yen | ¥ | ¥ |
| € | euro | € | € |
| § | section | § | § |
| © | copyright | © | © |
| ® | registered trademark | ® | ® |
| ™ | trademark | ™ | ™ |
Math Symbols Supported by HTML
| Character | Entity Number | Entity Name | Description |
|---|---|---|---|
| ∀ | ∀ | ∀ | for all |
| ∂ | ∂ | ∂ | partial differential |
| ∃ | ∃ | ∃ | there exists |
| ∅ | ∅ | ∅ | empty set |
| ∇ | ∇ | ∇ | nabla (gradient) |
| ∈ | ∈ | ∈ | is an element of |
| ∉ | ∉ | ∉ | is not an element of |
| ∋ | ∋ | ∋ | contains as member |
| ∏ | ∏ | ∏ | n-ary product |
| ∑ | ∑ | ∑ | n-ary summation |
| − | − | − | minus sign |
| ∗ | ∗ | ∗ | asterisk operator |
| √ | √ | √ | square root |
| ∝ | ∝ | ∝ | proportional to |
| ∞ | ∞ | ∞ | infinity |
| ∠ | ∠ | ∠ | angle |
| ∧ | ∧ | ∧ | logical and |
| ∨ | ∨ | ∨ | logical or |
| ∩ | ∩ | ∩ | intersection |
| ∪ | ∪ | ∪ | union |
| ∫ | ∫ | ∫ | integral |
| ∴ | ∴ | ∴ | therefore |
| ∼ | ∼ | ∼ | similar to |
| ≅ | ≅ | ≅ | congruent to |
| ≈ | ≈ | ≈ | almost equal to |
| ≠ | ≠ | ≠ | not equal to |
| ≡ | ≡ | ≡ | identical to |
| ≤ | ≤ | ≤ | less than or equal to |
| ≥ | ≥ | ≥ | greater than or equal to |
| ⊂ | ⊂ | ⊂ | subset of |
| ⊃ | ⊃ | ⊃ | superset of |
| ⊄ | ⊄ | ⊄ | not a subset of |
| ⊆ | ⊆ | ⊆ | subset of or equal to |
| ⊇ | ⊇ | ⊇ | superset of or equal to |
| ⊕ | ⊕ | ⊕ | circled plus |
| ⊗ | ⊗ | ⊗ | circled times |
| ⊥ | ⊥ | ⊥ | perpendicular to |
| ⋅ | ⋅ | ⋅ | dot operator |
Greek Letters Supported by HTML
| Character | Entity Number | Entity Name | Description |
|---|---|---|---|
| Α | Α | Α | Alpha |
| Β | Β | Β | Beta |
| Γ | Γ | Γ | Gamma |
| Δ | Δ | Δ | Delta |
| Ε | Ε | Ε | Epsilon |
| Ζ | Ζ | Ζ | Zeta |
| Η | Η | Η | Eta |
| Θ | Θ | Θ | Theta |
| Ι | Ι | Ι | Iota |
| Κ | Κ | Κ | Kappa |
| Λ | Λ | Λ | Lambda |
| Μ | Μ | Μ | Mu |
| Ν | Ν | Ν | Nu |
| Ξ | Ξ | Ξ | Xi |
| Ο | Ο | Ο | Omicron |
| Π | Π | Π | Pi |
| Ρ | Ρ | Ρ | Rho |
| Σ | Σ | Σ | Sigma |
| Τ | Τ | Τ | Tau |
| Υ | Υ | Υ | Upsilon |
| Φ | Φ | Φ | Phi |
| Χ | Χ | Χ | Chi |
| Ψ | Ψ | Ψ | Psi |
| Ω | Ω | Ω | Omega |
| α | α | α | alpha |
| β | β | β | beta |
| γ | γ | γ | gamma |
| δ | δ | δ | delta |
| ε | ε | ε | epsilon |
| ζ | ζ | ζ | zeta |
| η | η | η | eta |
| θ | θ | θ | theta |
| ι | ι | ι | iota |
| κ | κ | κ | kappa |
| λ | λ | λ | lambda |
| μ | μ | μ | mu |
| ν | ν | ν | nu |
| ξ | ξ | ξ | xi |
| ο | ο | ο | omicron |
| π | π | π | pi |
| ρ | ρ | ρ | rho |
| ς | ς | ς | sigmaf |
| σ | σ | σ | sigma |
| τ | τ | τ | tau |
| υ | υ | υ | upsilon |
| φ | φ | φ | phi |
| χ | χ | χ | chi |
| ψ | ψ | ψ | psi |
| ω | ω | ω | omega |
| ϑ | ϑ | ϑ | theta symbol |
| Υ | ϒ | ϒ | upsilon symbol |
| ϖ | ϖ | ϖ | pi symbol |
Other Entities Supported by HTML
| Character | Entity Number | Entity Name | Description |
|---|---|---|---|
| Œ | Œ | Œ | capital ligature OE |
| œ | œ | œ | small ligature oe |
| Š | Š | Š | capital S with caron |
| š | š | š | small S with caron |
| Ÿ | Ÿ | Ÿ | capital Y with diaeres |
| ƒ | ƒ | ƒ | f with hook |
| ˆ | ˆ | ˆ | modifier letter circumflex accent |
| ˜ | ˜ | ˜ | small tilde |
  |   | en space | |
  |   | em space | |
  |   | thin space | |
| | ‌ | ‌ | zero width non-joiner |
| | ‍ | ‍ | zero width joiner |
| | ‎ | ‎ | left-to-right mark |
| | ‏ | ‏ | right-to-left mark |
| – | – | – | en dash |
| — | — | — | em dash |
| ‘ | ‘ | ‘ | left single quotation mark |
| ’ | ’ | ’ | right single quotation mark |
| ‚ | ‚ | ‚ | single low-9 quotation mark |
| “ | “ | “ | left double quotation mark |
| ” | ” | ” | right double quotation mark |
| „ | „ | „ | double low-9 quotation mark |
| † | † | † | dagger |
| ‡ | ‡ | ‡ | double dagger |
| • | • | • | bullet |
| … | … | … | horizontal ellipsis |
| ‰ | ‰ | ‰ | per mille |
| ′ | ′ | ′ | minutes |
| ″ | ″ | ″ | seconds |
| ‹ | ‹ | ‹ | single left angle quotation |
| › | › | › | single right angle quotation |
| ‾ | ‾ | ‾ | overline |
| ← | ← | ← | left arrow |
| ↑ | ↑ | ↑ | up arrow |
| → | → | → | right arrow |
| ↓ | ↓ | ↓ | down arrow |
| ↔ | ↔ | ↔ | left right arrow |
| ↵ | ↵ | ↵ | carriage return arrow |
| ⌈ | ⌈ | ⌈ | left ceiling |
| ⌉ | ⌉ | ⌉ | right ceiling |
| ⌊ | ⌊ | ⌊ | left floor |
| ⌋ | ⌋ | ⌋ | right floor |
| ◊ | ◊ | ◊ | lozenge |
| ♠ | ♠ | ♠ | spade |
| ♣ | ♣ | ♣ | club |
| ♥ | ♥ | ♥ | heart |
| ♦ | ♦ | ♦ | diamond |
Non-breaking Space
The non-breaking space ( ) is one of the most common character entities used in HTML. It is a space that doesn’t break into a new line. This means that two words that are divided by a non-breaking space will stay together. Besides, the non-breaking space stops browsers from collapsing multiple spaces into a single one.
For the full list of code points and how characters map to numbers, see the HTML Unicode Reference.
Diacritical Marks
When we say a diacritical mark, we mean a “glyph” that is added to a letter. Some of these marks, like grave (̀) and acute (́) are called accents. Diacritical marks may occur above and below a letter, between two letters or inside a letter.
Here is a list containing some diacritical marks:
| Mark | Character | Construct | Result |
|---|---|---|---|
| ̀ | a | à | à |
| ́ | a | á | á |
| ̂ | a | â | â |
| ̃ | a | ã | ã |
| ̀ | O | Ò | Ò |
| ́ | O | Ó | Ó |
| ̂ | O | Ô | Ô |
| ̃ | O | Õ | Õ |