Special HTML Characters









HTML codes


Entity Name Numeric Code Descriptive Code Character
quotation mark " " "
ampersand & & &
less-than sign &#60; &lt; <
greater-than sign &#62; &gt; >
non-breaking space &#160; &nbsp;  
inverted exclamation &#161; &iexcl;
cent sign &#162; &cent;
pound sterling &#163; &pound;
general currency sign &#164; &curren;
yen sign &#165; &yen;
broken vertical bar &#166; &brvbar;
section sign &#167; &sect;
umlaut(dieresis) &#168; &uml;
copyright &#169; &copy;
feminineordinal &#170; &ordf;
left angle quote, guillemotleft &#171; &laquo;
not sign &#172; &not;
soft hyphen &#173; &shy; ­
registered trademark &#174; &reg;
macron accent &#175; &macr;
degree sign &#176; &deg;
plus or minus &#177; &plusmn;
superscript two &#178; &sup2;
superscript three &#179; &sup3;
acute accent &#180; &acute;
micro sign (Mu) &#181; &micro;
paragraph sign &#182; &para;
middle dot &#183; &middot;
cedilla &#184; &cedil;
superscript one &#185; &sup1;
masculine ordinal &#186; &ordm;
right angle quote, guillemotright &#187; &raquo;
fraction one-fourth &#188; &frac14;
fraction one-half &#189; &frac12;
fraction three-fourths &#190; &frac34;
inverted question mark &#191; &iquest;
capital A, grave accent &#192; &Agrave;
capital A, acute accent &#193; &Aacute;
capital A, circumflex accent &#194; &Acirc;
capital A, tilde &#195; &Atilde;
capital A, dieresis or umlaut mark &#196; &Auml;
capital A, ring (Angstrom) &#197; &Aring;
capital AE diphthong (ligature) &#198; &AElig;
capital C, cedilla &#199; &Ccedil;
capital E, grave accent &#200; &Egrave;
capital E, acute accent &#201; &Eacute;
capital E, circumflex accent &#202; &Ecirc;
capital E, dieresis or umlaut mark &#203; &Euml;
capital I, grave accent &#204; &Igrave;
capital I, acute accent &#205; &Iacute;
capital I, circumflex accent &#206; &Icirc;
capital I, dieresis or umlaut mark &#207; &Iuml;
capital Eth, Icelandic &#208; &ETH;
capital N, tilde &#209; &Ntilde;
capital O, grave accent &#210; &Ograve;
capital O, acute accent &#211; &Oacute;
capital O, circumflex accent &#212; &Ocirc;
capital O, tilde &#213; &Otilde;
capital O, dieresis or umlaut mark &#214; &Ouml;
multiply sign &#215; &times;
capital O, slash &#216; &Oslash;
capital U, grave accent &#217; &Ugrave;
capital U, acute accent &#218; &Uacute;
capital U, circumflex accent &#219; &Ucirc;
capital U, dieresis or umlaut mark &#220; &Uuml;
capital Y, acute accent &#221; &Yacute;
capital THORN, Icelandic &#222; &THORN;
small sharp s, German (sz ligature) &#223; &szlig;
small a, grave accent &#224; &agrave;
small a, acute accent &#225; &aacute;
small a, circumflex accent &#226; &acirc;
small a, tilde &#227; &atilde;
small a, dieresis or umlaut mark &#228; &auml;
small a, ring &#229; &aring;
small ae diphthong (ligature) &#230; &aelig;
small c, cedilla &#231; &ccedil;
small e, grave accent &#232; &egrave;
small e, acute accent &#233; &eacute;
small e, circumflex accent &#234; &ecirc;
small e, dieresis or umlaut mark &#235; &euml;
small i, grave accent &#236; &igrave;
small i, acute accent &#237; &iacute;
small i, circumflex accent &#238; &icirc;
small i, dieresis or umlaut mark &#239; &iuml;
small eth, Icelandic &#240; &eth;
small n, tilde &#241; &ntilde;
small o, grave accent &#242; &ograve;
small o, acute accent &#243; &oacute;
small o, circumflex accent &#244; &ocirc;
small o, tilde &#245; &otilde;
small o, dieresis or umlaut mark &#246; &ouml;
division sign &#247; &divide;
small o, slash &#248; &oslash;
small u, grave accent &#249; &ugrave;
small u, acute accent &#250; &uacute;
small u, circumflex accent &#251; &ucirc;
small u, dieresis or umlaut mark &#252; &uuml;
small y, acute accent &#253; &yacute;
small thorn, Icelandic &#254; &thorn;
small y, dieresis or umlaut mark &#255; &yuml;

Please note that similar characters (e.g. & ) are ordered by their numeric-based code on this page and might not be located near each other. If you have difficulty recreating special characters that appear on this page, you can always resort to "viewing" this document source. Have fun!

Special Note: I have noticed that Netscape 2.02 for MacOS and Unix incorrectly render some of the letter-based descriptive codes. For maximum compatibility (i.e. professionalism) use the numeric codes for these special characters.

Especially Useful Special Characters Examples
&#60 < <BLINK>
&#62 > </BLINK>
&#176 273C
&#183 CuSO45 H2O

I'd like to thank all the people that have provided feedback, constructive comments, and appreciation over years. Thanks for the help!
If you're looking for a "trademark" symbol (TM), try using HTML like <SUP><TT>TM</TT></SUP>
Any question unanswered should be pursued at the source.



How to convert a text into HTML


This C program reads a text file and generates HTML. It is written for UNIX, but it is really easy to adapt it for Windows.


#include <stdlib.h>
#include <stdio.h>

int main (int argc, char *argv[])
{
  int ch, code;
  FILE *sourcefile;


  if (argc < 3)
  {
    fprintf (stderr, "Usage: ascii2html <file> <code (0 or 1)>\n");
    exit (0);
  }

  if ((sourcefile=fopen(argv[1], "r"))==NULL)
  {
    fprintf(stderr,"Could not open \"%s\"\n", argv[1]);
    exit (0);
  }
  code = atoi(argv[2]);

  if (code) { printf("<pre><code>\n"); }

  while ((ch=getc(sourcefile))!=EOF)
  {
    if (
         (((unsigned char)ch >= 161) && ((unsigned char)ch <= 255))
         ||
         ((unsigned char)ch == 34)
         ||
         ((unsigned char)ch == 38)
         ||
         ((unsigned char)ch == 60)
         ||
         ((unsigned char)ch == 62)
       )
       { printf("&#%d;", (int)ch); }
       else { printf("%c",ch); }
  }

  if (code) { printf("</code></pre>\n"); }

  return 0;
}