Page name:
Advanced HTML - Character Entities [Logged in view]
[RSS]
2006-04-27 19:05:01
# of watchers: 1
|
Fans: 0
| D20: 17 |
Character Entities
Some characters have a special meaning, like the less than sign that defines the start of an HTML tag. If you want the browser to display a HTML code you must insert character entities in the HTML source.
A character entity has three parts: an ampersand (&), an entity name or a # and an entity number, and finally a semicolon (;).
To display a less than sign in an HTML document you must write: < or <
The advantage of using a name instead of a number is that a name is easier to remember. The disadvantage is that not all browsers support the newest entity names, while the support for entity numbers is very good in almost all browsers.
Please Note: That the entities are case sensitive.
The most common character entity is the non-breaking space.
HTML will normally shorten spaces in your text. If you write ten spaces in your text HTML will remove nine of them. To add more spaces to your text, use the
character entity.
Result Description Entity Name Entity Number
space  
< less than < <
greater than > >
& ampersand & &
" quotation mark " "
' apostrophe ' '
¢ cent ¢ ¢
£ pound £ £
¥ yen ¥ ¥
§ section § §
© copyright © ©
® registered ® ®
× multiplication × ×
÷ division ÷ ÷
| Show these comments on your site |