| Char | Named Entity | Numeric (Dec) | Numeric (Hex) | Description | Category | Copy |
|---|
Find named entities, numeric codes, and characters. Click any button to copy.
| Char | Named Entity | Numeric (Dec) | Numeric (Hex) | Description | Category | Copy |
|---|
HTML Entities Reference is a searchable database of HTML character entities -- special characters represented as &name; or &#number; codes in HTML. Search by character (copyright, arrows, math symbols), by entity name (copy, rarr, asymp), or by Unicode code point to find the correct HTML entity. Includes common symbols, currency, math, Greek letters, arrows, punctuation, and emoji code points.
HTML entities are needed when a character has special meaning in HTML and must be escaped: < (<), > (>), & (&), and " ("). All other characters can be used directly in UTF-8 HTML documents. However, entities are still useful for: characters not easily typeable, ensuring consistent rendering, and non-breaking space ( ) for spacing control.
Entity types: Named entities (© = copyright sign). Decimal numeric (© = copyright sign). Hex numeric (© = copyright sign). Modern HTML5 documents use UTF-8 and can include most characters directly -- you only need to escape the 5 special HTML characters: < > & " and apos.
Copyright symbol
Result: © renders as the copyright sign (or use © or the raw UTF-8 character)
Non-breaking space
Result: prevents line break between two words (useful for '10 kg' keeping value and unit together)
Em dash
Result: — renders as an em dash -- use for parenthetical phrases or range separators
When do I need to use HTML entities?
You MUST escape these 5 characters in HTML content: < (<), > (>), & (&), quote (" in attribute values), apostrophe (' or ' in single-quoted attributes). All other characters can be used directly in UTF-8 documents -- you do not need © for the copyright sign, just type it directly. Exceptions where entities are still useful: non-breaking space ( ) for layout, soft hyphen () for hyphenation hints.
What is a non-breaking space and when should I use it?
A non-breaking space (U+00A0, ) prevents a line break at that position. Use it: between a value and its unit (10 kg, 5 million) to prevent awkward breaks, in names that should stay together (Mr. Smith). Do not use as a substitute for CSS margin/padding -- use CSS for spacing. Too many in content is a maintenance anti-pattern; use CSS white-space properties instead.
What is the difference between en dash and em dash?
En dash (U+2013, –): roughly the width of N. Used for: number ranges (pages 5-10, 2020-2026), scores (3-1), compound adjectives with two-word elements (New York-based). Em dash (U+2014, —): roughly the width of M. Used for: parenthetical phrases -- like this -- or amplification. No spaces around em dashes in US English; spaces in British English. Hyphen (-): for compound words (well-known) and word breaking.
How do I display HTML code in a web page without it being interpreted?
Replace < with < and > with > -- this shows angle brackets as text without browser interpretation. Also replace & with &. Modern approach: use a code syntax highlighter library (Prism.js, Highlight.js) that handles escaping automatically. In React/JSX, use JSX variable interpolation -- React automatically escapes HTML characters to prevent XSS. If you use dangerouslySetInnerHTML, you are responsible for sanitizing.
What are the most commonly used HTML entities?
Most useful HTML entities: (non-breaking space), < and > (required escapes for angle brackets), & (required escape for ampersand), © (copyright symbol), ® (registered trademark), ™ (trademark), — (em dash), – (en dash), … (ellipsis), “ and ” (curly double quotes), • (bullet point), → (right arrow). In modern UTF-8 documents, you can type most of these characters directly rather than using entities.