HTML Symbols
Some characters have a special job in HTML, like < and >. Other characters, like the copyright sign, are not on the keyboard. To show them, we use HTML entities.
An entity starts with an ampersand &, then a name or a number, and ends with a semicolon.
Reserved characters
| Character | Entity name | Meaning |
|---|---|---|
| < | < | Less than |
| > | > | Greater than |
| & | & | Ampersand |
| " | " | Double quote |
| ' | ' | Single quote |
| (space) | | Non-breaking space |
If you want to show a tag like <p> as text on your page, write it as <p>. Otherwise the browser reads it as a real tag.
Popular symbols
| Symbol | Entity name | Entity number |
|---|---|---|
| © | © | © |
| ® | ® | ® |
| ™ | ™ | ™ |
| € | € | € |
| £ | £ | £ |
| ¥ | ¥ | ¥ |
| → | → | → |
| ♥ | ♥ | ♥ |
<p>© 2025 Tutorials Class. All rights reserved.</p>
<p>Price: €50 → £45</p>
Output in the browser
© 2025 Tutorials Class. All rights reserved.
Price: €50 → £45
Non-breaking space
HTML shows many spaces as one. forces a space that stays and also stops the line from breaking between two words. Do not use many of them to make gaps; use CSS margin and padding.
Read the interview question How to add the copyright symbol to a web page?
Summary
- Entities show reserved characters and symbols.
- Write them as
&name;or&#number;. - Use
<and>to show tags as text. - If your page uses UTF-8, you can also type many symbols directly.
Congratulations! Chapter Finished. Learn more about the similar topics:
| Exercises & Assignments |
|---|
| No Content Found. |
| Interview Questions & Answers |
|---|
| No Content Found. |