Home / Learn HTML / HTML Entities and Symbols

HTML Entities and Symbols

Some characters are reserved or missing from the keyboard. Entities let you write them safely.

Definition

An HTML entity is a code that stands for a character. It begins with & and ends with ;. You need entities because some characters have a special job in HTML (like < and &) and others are not on your keyboard (like © or €).

CharacterEntity nameNumber
<&lt;&#60;
>&gt;&#62;
&&amp;&#38;
"&quot;&#34;
©&copy;&#169;
€&euro;&#8364;
non breaking space&nbsp;&#160;

The non breaking space &nbsp; stops the browser from breaking a line between two words, for example between 10 and km. It is not a tool for layout.

Theory in plain words

Entity to symbol&lt;Browser replaces<Shown as text
Entity to symbol

What it is

Entities are codes such as &lt; and &copy; that show special characters.

Why we use it

Characters like < and & have special meaning in HTML. Entities let you show them as text, and add symbols you cannot type.

How it works

The browser replaces the code with the symbol while drawing. The pattern is &name; or &#number;.

Where it is used

  • Showing code examples
  • Copyright and currency symbols
  • Non-breaking space between words
Show tag symbolsTry it Yourself

&lt; is the less than sign and &gt; is greater than.

Ampersand and quotesTry it Yourself
Non breaking spaceTry it Yourself

Keeps the number and unit together on one line.

Copyright and trademarkTry it Yourself
CurrencyTry it Yourself
Math symbolsTry it Yourself
ArrowsTry it Yourself
Fractions and degreesTry it Yourself
EmojiTry it Yourself

Emoji have number codes. You can also paste emoji directly.

Direct emojiTry it Yourself
Stars and ticksTry it Yourself
SymbolEntityNumber
<&lt;&#60;
>&gt;&#62;
&&amp;&#38;
"&quot;&#34;
©&copy;&#169;
€&euro;&#8364;

Quick quiz

1. How do you show < in text?

2. &nbsp; is

3. Which shows the copyright symbol?

Common questions

How do you show < in text?

&lt;. &lt; is the less than entity.

Which shows the copyright symbol?

&copy;. &copy; gives the copyright sign.

My notes
Ask a question about this lesson