Help:HTML Entity


 * See Help:Special characters at meta.wikimedia.org for more general info about special characters in MediaWiki based wikis.

What is an HTML Entity?
An HTML entity is a special character string that is translated by an HTML parser into a single character or symbol. All entities begin with the &amp; (ampersand) and end with a ; (semi-colon). All fonts should support rendering of all of the ASCII range from 0 - 127 in a similar fashion (except specialty symbol fonts), but above that range the symbols used may not be reliably consistent from font to font. The use of entities is one method to try to maintain consistency of rendering character glyphs.

The basic Latin-1 character set (also known as ISO 8859-1) outside of the typical roman keyboard set has entity codes for most characters (mostly from #160 to #255) in the form of special names (usually abbreviated descriptions or acronyms). All characters including unicode can be represented by decimal versions (&dddd;) or hexadecimal versions (&xhhhh;).

Support for entities is not specific to wikis, but should be supported by all wikis, since they generally represent a translation layer from wikicode to HTML (though usually also including CSS and Javascript). This article does not apply directly to use in wikis, but is provided as a tool to use along with other wiki features.

Use of entities in Wowpedia
In general, wiki editors like to use the &lt;nowiki&gt; tag to temporarily turn off special properties of wiki-reserved characters like *, &#91;, or &#123;. However, you can also use entities to display these wiki-characters without the wiki parser trying to do something with them.

NOTE: Named entity codes are case-sensitive, hence  (→) and   (⇒) are different.

Wiki-character entities
Here are some commonly used wiki-characters and their entity codes:

Escaping HTML characters with entities
Entities are also useful for rendering characters that might otherwise be parsed as HTML (or SGML tags specific to the wiki, like &lt;nowiki&gt;).

In a wiki, you might want to use  to describe what &lt;nowiki&gt;</tt> looks like.

Common symbols used in wikis
Here are some entity codes for symbols often used in wikis:

Non-alphanumeric symbols
There are also a variety of non-alphanumeric symbols with entity codes that have a variety of uses.

Other reasons to use entities
Often people copy-paste special characters (like € or ®) from some other source, like MS Word to a wiki editor and expect everyone to see the same character glyph. Unfortunately, most computer OSes encode these characters differently in their binary form when being transferred from one place to another. So, you can't rely on everything looking as you expect when someone looks at it on a browser on a different OS (problems between MS Windows and Macintosh are notorious). Entities solve this problem by, in most cases, identifying the character symbol by a common code that HTML renderers know how to display by standard. Non-unicode entities in the 128 to 255 ASCII range that don't use named codes (like  for € or   for ®) aren't as reliable, but most of the others will display what you expect or the generic box (☐) or question mark to indicate the glyph is not present in the font.