Link to USGS home page
Internal USGS Access Only

Learning HTML - Special Characters

Special Characters
There are three characters that you must encode if you want them to display in an HTML document. To display any of these characters you should substitute an html entity:
 >   >
 <   &lt;
 &   &amp;

Entities
With HTML 4.01 there are a great number of non-ascii characters that can be represented, including:
  Spoken languages   ¿     &iquest;  
  ä     &auml;
  ú     &uacute;
  Greek symbols (newer browser versions)       Δ     &Delta;
  ω     &omega;
  Σ     &Sigma;
  Commercial symbols   ¢     &cent;
  ®     &reg;
  ™     &trade;
  Scientific Symbols   ±     &plusmn;
  ²     &sup2;
  µ     &micro;

Additionally, many typesetting features are available, such as:
  &nbsp;   nonbreaking space
&mdash;   the em dash (newer browser versions)
&ndash;   the em dash (newer browser versions)
­ &shy;   and soft hyphens (newer browser versions)

Entities have two forms, a numeric (decimal or hexadecimal) and a verbose form. For example, the entity for the fraction one-half, ½, can be specified as either  &frac12; or  &#189;. All entities start with an ampersand (&) and end with a semi-colon (;).

Two helpful entity listings are: Web Design Group's listing of HTML 4.01 entities, and Natural-Innovation's HTML Document Character Set.

Note: Entities are case-sensitive. Support for different entities may be different on different operating systems, depend on what fonts are available, and on what browser is used. A Simple Character Entity Chart: Browser support table.

An interesting project worth tracking is, STIX Fonts, an effort to create a font set for the scientific publishing community.

slide 15


[up]
"Mastering a Web Site" online course
Created and maintained by Lorna Schmid and David Boldt.
http://water.usgs.gov/usgs/training/webmaster/html_entities.html    
Last modified: Wed Oct 15 17:09:23 EDT 2003