3 years ago
Shahzad Gujjar
1,863 Views
2
You’ll learn how to display special characters and symbols using HTML entities in this tutorial,
What is HTML Entity?
Some characters are reserved in HTML, for example, you cannot use the less than (<) or greater than (>) signs or angle brackets inside your text because the browser can mistake them for markup, and some characters, such as the copyright symbol, are not present on the keyboard.
These special characters must be replaced with character entities in order to be displayed. Character entity references, or entities for short, allow you to use characters that aren’t expressed in the document’s character encoding or can’t be typed in using a keyboard.
Frequently Used HTML Character Entities
Result Description Entity Name Numerical reference non-breaking space < less than < < > greater than > > & ampersand & & “ quotation mark " “ ‘ apostrophe ' ‘ ¢ cent ¢ ¢ £ pound £ £ ¥ yen ¥ ¥ € euro € € © copyright © © ® registered trademark ® ® ™ trademark ™ ™
Instead of using entity names, you can use numeric character references. The use of numeric character references has the advantage of better browser support and the ability to specify any Unicode character, while entities are limited to a subset of this.
The names of HTML entities are case-sensitive! For a complete list of character entities for special characters and symbols, see the HTML character entities reference.
Nonbreaking space ( ) is a space between two items that cannot be divided by a line split. Since web browsers only show one space when multiple spaces are created using the spacebar key, they are often used to display multiple spaces.
3 years ago
Shahzad Gujjar
1,863 Views
2