HTML and CSS Reference
In-Depth Information
Geometric Shapes
Intended
Rendering
Named Entity
Numbered Entity
Unicode Entity
Description
Notes
◊
◊
◊
Lozenge
Miscellaneous Symbols
Numbered
Entity
Unicode
Entity
Intended
Rendering
Named Entity
Description
Notes
♠
♠
♠
Spade suit
♣
♣
♣
Club suit
♥
♥
♥
Heart suit
♦
♦
♦
Diamond suit
Embracing Unicode
There are more special characters besides what is defined in the (X)HTML specifications.
When looking at the HTML 4 entities, you can see a mapping between Unicode characters
(such as the diamond suit character represented by Unicode U+02666 and a named entity
like ♦ ), which hints at the larger character set available.
To properly support Unicode characters, (X)HTML should be delivered with the
appropriate HTTP response header:
Content-Type: text/html; charset=utf-8
or with a <meta> tag in the head element of similar value:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
In a few cases when a markup element supports a charset attribute, you can set the
character encoding value there as well.
<a href="sushimenu.html" charset="utf-8"> Sushi Menu </a>
However, the header or <meta> tag solution is favored over this according to the
specification.
Unicode characters beyond what is defined under HTML 4 and XHTML 1 could be
named. To this end, the W3C has started to define entity names for XML (www.w3.org/TR/
xml-entity-names/), but these named entities are not currently supported, as illustrated by
this small example:
<p> &phone; &#x0260E; </p>
 
Search WWH ::




Custom Search