HTML Decimal Character Rendering - Illegal Characters

Illegal Characters

HTML forbids the use of the characters with Universal Character Set/Unicode code points

  • 0 to 31, except 9, 10, and 13 (C0 control characters)
  • 127 (DEL character)
  • 128 to 159 (C1 control characters)
  • 55296 to 57343 (xD800–xDFFF, the UTF-16 surrogate halves)

These characters are not even allowed by reference. That is, you should not even write them as numeric character references. However, references to characters 128–159 are commonly interpreted by lenient web browsers as if they were references to the characters assigned to bytes 128–159 (decimal) in the Windows-1252 character encoding. This is in violation of HTML and SGML standards, and the characters are already assigned to higher code points, so HTML document authors should always use the higher code points. For example, for the trademark sign (™), use ™, not ™.

The characters 9 (tab), 10 (linefeed), and 13 (carriage return) are allowed in HTML documents, but, along with 32 (space) are all considered "whitespace". The "form feed" control character, which would be at 12, is not allowed in HTML documents, but is also mentioned as being one of the "white space" characters — perhaps an oversight in the specifications. In HTML, most consecutive occurrences of white space characters, except in a

 block, are interpreted as comprising a single "word separator" for rendering purposes. A word separator is typically rendered a single en-width space in European languages, but not in others.

Read more about this topic:  HTML Decimal Character Rendering

Famous quotes containing the words illegal and/or characters:

    Consider the vice president, George Bush, a man so bedeviled by bladder problems that he managed, for the last eight years, to be in the men’s room whenever an important illegal decision was made.
    Barbara Ehrenreich (b. 1941)

    A criminal trial is like a Russian novel: it starts with exasperating slowness as the characters are introduced to a jury, then there are complications in the form of minor witnesses, the protagonist finally appears and contradictions arise to produce drama, and finally as both jury and spectators grow weary and confused the pace quickens, reaching its climax in passionate final argument.
    Clifford Irving (b. 1930)