HTML and CSS Reference
In-Depth Information
aPPLyinG sPeciaL cHaracTers
Special characters, like the copyright or trademark symbols, are known in HTML as character enti-
ties. A character entity starts with an ampersand and ends with a semicolon, with either an abbrevi-
ated name or a number in between. For example, if you want the ampersand itself to be rendered
properly in HTML, it should be written in the code like this:
And a trademark symbol is coded like this:
When used in context, code that looks like this:
<p>M &amp; J Productions is proud to present An Evening of Nerditry&#8482;
would be rendered like this:
M & J Productions is proud to present An Evening of Nerditry™
A great number of character entities exist. In addition to visible special characters, a non-breaking
space that connects two words or adds additional white space is represented in code with a char-
acter entity, &nbsp. Any word that requires an accent or other diacritical mark needs a character
entity. Because HTML code uses the <and> characters to indicate tags, if you want to use a less
than or greater than symbol in your content, you'll need to use their respective character entities:
&lt; and &gt.
The following table shows some of the most commonly used character entities:
sPeciaL cHaracTer
HTML cHaracTer enTiTy
non-breaking space
&nbsp; or &#160;
&lt; or &#60;
Less than sign
&gt; or &#62;
Greater than sign
Copyright symbol
&copy; or &#169;
Registered symbol
&reg; or &#179;
Trademark symbol
&trade; or &#8482;
&mdash; or &#8212;
&ndash; or &#8211;
English pound sign
&pound; or &#163;
European euro
&euro; or &#8364;
&yen; or &165;
Japanese yen
Search WWH ::

Custom Search