&entity_name;
OR
&#entity_number;
To display a less than sign we must write: < or < The advantage of using an entity name, instead of a number, is that the name is easier to remember. However, the disadvantage is that browsers may not support all entity names (the support for entity numbers is very good).
Non-breaking Space
A common character entity used in HTML is the non-breaking space ( ). Browsers will always truncate spaces in HTML pages. If you write 10 spaces in your text, the browser will remove 9 of them, before displaying the page. To add spaces to your text, you can use the character entity.
HTML Useful Character Entities
Entity names are case sensitive. Following is list of entity names with their description.
Result | Description | Entity Name | Entity Number |
---|---|---|---|
non-breaking space | |   | |
< | less than | < | < |
> | greater than | > | > |
& | ampersand | & | & |
¢ | cent | ¢ | ¢ |
£ | pound | £ | £ |
¥ | yen | ¥ | ¥ |
€ | euro | € | € |
§ | section | § | § |
© | copyright | © | © |
® | registered trademark | ® | ® |
™ | trademark | ™ | ™ |
No comments:
Post a Comment