HTML Entities for Typography and Symbols: A Practical Guide

May 28, 20266 min read

Why Typography Entities Matter

Good typography is invisible — bad typography stands out. When a curly quote renders as a straight mark, an em dash becomes a double hyphen, or a currency symbol breaks into a question mark, readers notice. HTML entities give you reliable control over these characters across browsers, encodings, and devices.

Using the right entity instead of a keyboard approximation signal professionalism. A proper em dash () communicates differently from a double hyphen (--), and correct quotation marks shape how people read your content.

Quotation Marks

Straight quotes (" and ') are keyboard conveniences, not typographic characters. Professional content uses curly quotes:

CharacterEntityRenders AsUse
Left double“"Opening double quote
Right double”"Closing double quote
Left single‘'Opening single quote, apostrophe
Right single’'Closing single quote
<p>&ldquo;I can&rsquo;t believe it,&rdquo; she said.</p>
<!-- "I can't believe it," she said. -->

Many content management systems auto-convert straight quotes to curly quotes, but when you write raw HTML, you need the entities.

Dashes and Hyphens

English uses three horizontal line characters with distinct meanings:

CharacterEntityRenders AsUse
Hyphen- (direct)-Compound words: well-known
En dash&ndash;Ranges: pages 10–12, 2024–2026
Em dash&mdash;Interruptions: The result — surprising — was clear

The en dash is wider than a hyphen but narrower than an em dash. It connects spans of numbers, dates, and scores. The em dash sets off parenthetical thoughts or dramatic pauses.

<p>The conference runs June 10&ndash;12 and features speakers from three continents&mdash;an unprecedented lineup.</p>

Spaces

HTML collapses multiple spaces into one. Entity-based spaces give you precise control:

EntityNameWidthUse
&nbsp;Non-breaking spaceSame as spacePrevent line breaks between words
&ensp;En spaceWidth of an "n"Tabular alignment
&emsp;Em spaceWidth of an "m"Paragraph indentation
&thinsp;Thin spaceNarrower than spaceThousand separators: 1 000

Non-breaking spaces are the most used — they prevent the browser from wrapping text at that point. Use them between a number and its unit (10&nbsp;kg) or in navigation labels where a line break would look awkward.

Currency Symbols

SymbolEntityDescription
$$ (direct)Dollar
&euro;Euro
£&pound;Pound sterling
¥&yen;Yen / Yuan
¢&cent;Cent
&#x20A9;Won (numeric only)
&#x20B9;Indian rupee (numeric only)

Not all currency symbols have named entities. For newer symbols like the Indian rupee (₹) or Bitcoin (₿), use numeric references.

Mathematical and Scientific Symbols

SymbolEntityDescription
±&plusmn;Plus-minus
×&times;Multiplication
÷&divide;Division
&le;Less than or equal
&ge;Greater than or equal
&ne;Not equal
&asymp;Approximately equal
°&deg;Degree
µ&micro;Micro
&infin;Infinity

Arrows and Structural Symbols

SymbolEntityDescription
&larr;Left arrow
&rarr;Right arrow
&uarr;Up arrow
&darr;Down arrow
&bull;Bullet
§&sect;Section sign
&para;Paragraph sign
&dagger;Dagger
&Dagger;Double dagger

When to Use Named vs. Numeric Entities

  • Named entities — Use for the common characters you type often: &mdash;, &nbsp;, &ldquo;. They're readable and self-documenting.
  • Decimal numeric — Use as a fallback when a named entity doesn't exist: &#8230; for an ellipsis.
  • Hex numeric — Use when referencing Unicode charts: &#x2026; for the same ellipsis. Hex matches Unicode notation, making cross-referencing easier.

Key Takeaways

  • Typography entities make content look professional — curly quotes, proper dashes, and correct spaces matter
  • Use &mdash; for em dashes, &ndash; for ranges, and hyphens only for compound words
  • Non-breaking spaces (&nbsp;) prevent awkward line breaks in numbers, units, and labels
  • Not all symbols have named entities — use numeric references for newer Unicode characters
  • Prefer named entities for readability; use numeric references when no name exists
  • Always test special characters across browsers and encodings to catch rendering issues

Try It Yourself

Encode and decode HTML entities instantly with our free HTML Entity Encoder/Decoder. Paste any text and get properly encoded output — including all typographic symbols.