Using the Character Entities in XHTML:-
Character entities are numeric representations of characters, and they display the desired character regardless of the document encoding. So they come in handy. How to represent them in XHTML can become a bit confusing, however, because they can be represented in three ways:
1. By numerical entities that use decimal values.
2. By numerical entities that use hexadecimal values.
3. By named entities.
Numerical Entities That Use Decimal Values
Numerical entities can be defined by decimal values. With decimal values, you specify the character by using this syntax: &#Unicodevalue; where Unicodevalue is a unique number assigned to this symbol.
Here's how you would code the decimal numerical entity for the division sign:
<body>
<p>I often use the ÷ sign.</p>
</body>
Numerical Entities That Use Hexadecimal Values
Numerical representations of entities can also be in hexadecimal values. Hex values can usually be found in the same locations as the decimal values—Web sites and text editors. To represent entities using hex values, you use the following syntax: &#xhexadecimalvalue; where the hexadecimal value of the character replaces hexadecimalvalue.
Here is the same example using the hexadecimal representation of the division-sign entity:
<body>
<p>I often use the ÷ sign.</p>
</body>
Referring to Entities by Name
Eventually it was realized that using the decimal and hexadecimal representations was not the most intuitive way to code entities. Slowly, names have evolved for the entities. They are a certainly more intuitive, but they are sometimes a bit odd.
Often, it's easy to think of several abbreviations for an entity. For example, you might wonder whether the named entity for the division sign is ÷, ÷, or &division;. It's ÷, and its use is demostrated in this example:
<body>
<p>I often use the ÷ sign.</p>
</body>


LinkBack URL
About LinkBacks
Reply With Quote

LinkBacks Enabled by vBSEO
Bookmarks