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 &copy; 2023</p>

<!-- Decimal entity -->
<p>Copyright &#169; 2023</p>

<!-- Hexadecimal entity -->
<p>Copyright &#xA9; 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

NameEntity NameEntity NumberSymbolDescriptionAction
Ampersand&amp;&#x26;&Must be escaped in HTML
Less Than&lt;&#x3C;<Starts HTML tags
Greater Than&gt;&#x3E;>Ends HTML tags
Double Quote&quot;&#x22;"For attribute values
Single Quote&apos;&#x27;'Alternative for attributes

Common Symbols

NameEntity NameEntity NumberSymbolDescriptionAction
Non-breaking Space&nbsp;&#xA0; Prevents line breaks
Copyright&copy;&#xA9;©Copyright symbol
Registered Trademark&reg;&#xAE;®Registered mark
Trademark&trade;&#x2122;Trademark symbol
Euro&euro;&#x20AC;Euro currency
Pound&pound;&#xA3;£British pound

Mathematical Symbols

NameEntity NameEntity NumberSymbolDescriptionAction
Plus&plus;&#x2B;+Addition
Minus&minus;&#x2212;-Subtraction
Multiplication&times;&#xD7;×Multiply
Division&divide;&#xF7;÷Divide
Equals&equals;&#x3D;=Equality
Not Equal&ne;&#x2260;Inequality

Accented Characters

NameEntity NameEntity NumberSymbolDescriptionAction
A acute&aacute;&#xE1;áLatin small a with acute
E grave&egrave;&#xE8;èLatin small e with grave
I circumflex&icirc;&#xEE;îLatin small i with circumflex
O tilde&otilde;&#xF5;õLatin small o with tilde
U umlaut&uuml;&#xFC;üLatin small u with diaeresis
C cedilla&ccedil;&#xE7;çLatin small c with cedilla

Greek Letters

NameEntity NameEntity NumberSymbolDescriptionAction
Alpha&alpha;&#x3B1;αGreek small alpha
Beta&beta;&#x3B2;βGreek small beta
Gamma&gamma;&#x3B3;γGreek small gamma
Delta&delta;&#x3B4;δGreek small delta
Pi&pi;&#x3C0;πGreek small pi
Omega&omega;&#x3C9;ω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>&lt;div&gt; &amp; &quot;</p>
  
  <!-- Common symbols -->
  <p>&copy; &reg; &trade;</p>
  
  <!-- Currency -->
  <p>&euro; &pound; &yen;</p>
  
  <!-- Math -->
  <p>&pi; &radic; &infin;</p>
  
  <!-- Accents -->
  <p>&eacute; &ntilde; &uuml;</p>
</body>
</html>
< Previous (HTML Symbols)Next (Character Sets) >