Wiki:
Page name: Advanced HTML - Character Entities [Exported view] [RSS]
2006-04-27 19:05:01
Last author: Stephen
Owner: Stephen
# of watchers: 1
Fans: 0
D20: 17
Bookmark and Share

Advanced HTML - Character Entities



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: &lt; 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.

<img:stuff/2237_wiki_help_9y7vcgcflr5.jpg>


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 &nbsp; character entity.

<img:stuff/2237_wiki_help_9y7vcgcflr5.jpg>


Result  Description     Entity Name     Entity Number
        space           &nbsp;               &#160;
<       less than       &lt;                 &#60;
       greater than    &gt;                 &#62;
&       ampersand       &amp;                &#38;
"       quotation mark  &quot;               &#34;
'       apostrophe      &apos;               &#39;
¢       cent            &cent;	             &#162;
£       pound           &pound;              &#163;
¥       yen             &yen;                &#165;
§       section         &sect;               &#167;
©       copyright       &copy;               &#169;
®       registered      &reg;                &#174;
×       multiplication  &times;              &#215;
÷       division        &divide;             &#247;

Username (or number or email):

Password:

Show these comments on your site

Elftown - Wiki, forums, community and friendship.