HTML entities are used to account for reserved char­ac­ters or special symbols in the code output. These entities are clearly defined sequences that signal to the browser to display a specific character.

What are HTML entities?

HTML entities offer the pos­sib­il­ity to express certain char­ac­ters in an HTML document, which:

  • are not naturally available in the input method being used or are difficult to enter.
  • are reserved for HTML and fulfill their own coding function.

In order to still be able to map these char­ac­ters without damaging the code, these clearly definable character strings are used. A dis­tinc­tion is made between named entities (entity names) and numeric entities (entity numbers). While named HTML entities are easier to read and remember, numerical entities are par­tic­u­larly important when there is no named variant.

Web hosting
The hosting your website deserves at an un­beat­able price
  • Loading 3x faster for happier customers
  • Rock-solid 99.99% uptime and advanced pro­tec­tion
  • Only at IONOS: up to 500 GB included

Named HTML entities

Named HTML entities have the following format:

&entity_name;
html

To display the ampersand symbol &, it needs to be coded as & (short for ampersand). The example below demon­strates how this entity is used:

<!DOCTYPE html>
<html>
<body>
<h1>Example of a named entity</h1>
<h2>The ampersand looks like this: &amp</h2>
</body>
</html>
html
Note

Named HTML entities are case-sensitive so make sure to check upper and lower case.

Numeric HTML entities

Numeric HTML entities are written in the following format:

&#entity_number;
html

In place of entity_number, enter the Unicode value of the character you want to use. To write an ampersand, for example, you would use the character string &#38;. Here’s what a numeric HTML entity looks like inside code:

<!DOCTYPE html>
<html>
<body>
<h1>Example of a numeric entity</h1>
<h2>The ampersand looks like this: &#38;</h2>
</body>
</html>
html
Register your domain name
Launch your business on the right domain
  • Free WordPress with .co.uk
  • Free website pro­tec­tion with one Wildcard SSL
  • Free Domain Connect for easy DNS setup

List of common HTML entities

Whether you’re just starting to learn HTML or have been using the markup language for some time, having a list of the most important HTML entities is always helpful. In the following sections, you’ll find some of the most commonly used HTML entities listed by category.

Punc­tu­ation

Character De­scrip­tion Named Numeric
Non-breaking space &nbsp; &#160;
. Period &period; &#46;
, Comma &comma; &#44;
! Ex­clam­a­tion mark &excl; &#33;
? Question mark &quest; &#63;
& Ampersand &amp; &#38;
Quotation marks &quot; &#34;
Apo­strophe &apos; &#39;
# Hash &num; &#35;
( Left bracket &lpar; &#40;
) Right bracket &rpar; &#41;
% Percent sign &percnt; &#37;
§ Section sign &sect; &#167;

Special char­ac­ters

Character De­scrip­tion Named Numeric
© Copyright &copy; &#169;
® Re­gistered trademark &reg; &#174;
Trademark &trade; &#8482;
@ At sign &commat; &#64;
Female symbol &female; &#9792;
Male symbol &male; &#9794;
Tick &check; &#10003;
Cross mark &cross; &#10007;

Math­em­at­ic­al symbols

Character De­scrip­tion Named Numeric
+ Plus sign &plus; &#43;
Minus sign &minus; &#8722;
× Mul­ti­plic­a­tion sign &times; &#215;
÷ Division sign &divide; &#247;
= Equals sign &equals; &#61;
< Less than &lt; &#60;
> Greater than &gt; &#62;

Cur­ren­cies

Character De­scrip­tion Named Numeric
Euro &euro; &#8364;
¢ Cent &cent; &#162;
$ Dollar &dollar; &#36;
£ Pound &pound; &#163;
¥ Yen &yen; &#165;
Tip

Our Digital Guide has many more articles on Hypertext Markup Language (HTML) and related topics. For example, you can explore what HTML tags are, the special features of HTML5 and how to get started with CSS.

Go to Main Menu