- Home
- /
- Tutorials
- /
- HTML Tutorial
- /
- HTML Entities & Symbols
Advanced HTML
HTML Entities & Symbols
Some characters have a special job in HTML. A
<starts a tag, and an&starts an entity. To show them as plain text, you write them as entities:<for<,&for&. Entities also let you type symbols that are not on your keyboard, like © or ₹.
An entity starts with & and ends with ;. In between is either a name, like copy, or a number, like #169. Both give the same character.
Syntax
html
&entity_name;
OR
&#entity_number;When you must use an entity
Only two characters really need it in normal text:
<must be written<whenever it could look like the start of a tag.x<ymay survive, butx<bturns into a broken bold tag.&should be written&when it is followed by letters, like "Tom & Jerry" or a URL with?a=1&b=2, so the browser does not read it as the start of an entity.
Inside attribute values, write " for a " if the value is wrapped in double quotes. And > is safe in text, but writing > keeps code samples easy to read.
Showing reserved characters as text
html
<p>10 < 20 && 20 > 10</p>That shows 10 < 20 && 20 > 10 on the page, exactly as written for a JavaScript lesson.
Commonly used entities
| Character | Entity name | Entity number | Meaning |
|---|---|---|---|
| < | < | < | Less than |
| > | > | > | Greater than |
| & | & | & | Ampersand |
| " | " | " | Double quote |
| ' | ' | ' | Apostrophe |
| © | © | © | Copyright |
| ® | ® | ® | Registered trademark |
| ™ | ™ | ™ | Trademark |
| ₹ | none | ₹ | Indian rupee |
| € | € | € | Euro |
| £ | £ | £ | Pound |
| → | → | → | Right arrow |
Entities in a page
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML Entities Example</title>
</head>
<body>
<h2>HTML Entities Demo</h2>
<p>5 < 10 and 10 > 5</p>
<p>Copyright © 2025 HTML5 & CSS3</p>
<p>Price: ₹500</p>
<p>Symbols: ♥ ☆ ✓ ™</p>
</body>
</html>Math and other symbols
| Symbol | Entity | Meaning |
|---|---|---|
| × | × | Multiplication |
| ÷ | ÷ | Division |
| ± | ± | Plus or minus |
| ≠ | ≠ | Not equal |
| ∞ | ∞ | Infinity |
| ∑ | ∑ | Sum |
| ♥ | ♥ | Heart |
| ✓ | ✓ | Check mark |
Do you still need entities for symbols?
Not really. If your page has <meta charset="UTF-8">, and it should, you can type or paste ©, ₹ or ✓ directly into the HTML and they will display correctly. Entities for symbols are now mostly a convenience when a character is hard to type. The reserved characters < and & are the ones you must still escape.
One entity people misuse is , the non-breaking space. Use it to keep two words together on one line, like "10 kg". Do not use rows of them to create spacing; that is what CSS margin and padding are for.
Browser Support
Chrome | Edge | Firefox | Safari | Opera | IE9+ |
|---|---|---|---|---|---|
| Yes | Yes | Yes | Yes | Yes | Yes |
HTML Entities & Symbols exercises
Show a less-than sign
Write the paragraph 5 < 9 and use the entity for the sign.
Result
