How to display characters and symbols with HTML entities
HTML entities are used to account for reserved characters 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 possibility to express certain characters 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 characters without damaging the code, these clearly definable character strings are used. A distinction 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 particularly important when there is no named variant.
- Loading 3x faster for happier customers
- Rock-solid 99.99% uptime and advanced protection
- Only at IONOS: up to 500 GB included
Named HTML entities
Named HTML entities have the following format:
&entity_name;htmlTo display the ampersand symbol &, it needs to be coded as & (short for ampersand). The example below demonstrates how this entity is used:
<!DOCTYPE html>
<html>
<body>
<h1>Example of a named entity</h1>
<h2>The ampersand looks like this: &</h2>
</body>
</html>htmlNamed 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;htmlIn 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 &. 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: &</h2>
</body>
</html>html- Free WordPress with .co.uk
- Free website protection 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.
Punctuation
| Character | Description | Named | Numeric |
|---|---|---|---|
| Non-breaking space |
|
 
|
|
| . | Period | .
|
.
|
| , | Comma | ,
|
,
|
| ! | Exclamation mark | !
|
!
|
| ? | Question mark | ?
|
?
|
| & | Ampersand | &
|
&
|
| “ | Quotation marks | "
|
"
|
| ’ | Apostrophe | '
|
'
|
| # | Hash | #
|
#
|
| ( | Left bracket | (
|
(
|
| ) | Right bracket | )
|
)
|
| % | Percent sign | %
|
%
|
| § | Section sign | §
|
§
|
Special characters
| Character | Description | Named | Numeric |
|---|---|---|---|
| © | Copyright | ©
|
©
|
| ® | Registered trademark | ®
|
®
|
| ™ | Trademark | ™
|
™
|
| @ | At sign | @
|
@
|
| ♀ | Female symbol | ♀
|
♀
|
| ♂ | Male symbol | ♂
|
♂
|
| ✓ | Tick | ✓
|
✓
|
| ✗ | Cross mark | ✗
|
✗
|
Mathematical symbols
| Character | Description | Named | Numeric |
|---|---|---|---|
| + | Plus sign | +
|
+
|
| − | Minus sign | −
|
−
|
| × | Multiplication sign | ×
|
×
|
| ÷ | Division sign | ÷
|
÷
|
| = | Equals sign | =
|
=
|
| < | Less than | <
|
<
|
| > | Greater than | >
|
>
|
Currencies
| Character | Description | Named | Numeric |
|---|---|---|---|
| € | Euro | €
|
€
|
| ¢ | Cent | ¢
|
¢
|
| $ | Dollar | $
|
$
|
| £ | Pound | £
|
£
|
| ¥ | Yen | ¥
|
¥
|
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.

