Ravens PHP Scripts

Character Entity References in HTML 4 and XHTML 1.0
Date: Friday, July 31, 2009 @ 11:38:50 CEST
Topic: Tutorials

Character Entity References in HTML 4 and XHTML 1.0
Author: Elizabeth Castro

Here is a set of tables containing the 252 allowed entities in HTML 4 and XHTML 1.0, as described in section 24 of the official HTML 4 specifications, published by the W3C. I have divided them into my own, hopefully logical, categories:

  • Entities for characters with special meaning in HTML and XHTML
  • Entities for accented characters, accents, and other diacritics from Western European Languages
  • Entities for punctuation characters
  • Entities for mathematical and technical characters (including Greek)
  • Entities for shapes and arrows

Each table has five columns. The first column contains the entity reference, in the form &entity_name;, that is, an ampersand, the entity name, and then a semi colon. The second column displays how that entity appears in your browser. The proper character will only appear if you have a font that can display it. The third column contains the number reference for the same character in the form &#number;, that is, an ampersand, a hash symbol (which signals that a number reference is coming), the character's number, and then a semi colon. The fourth column shows how the number reference displays in your browser. Again, the proper character is only displayed if the default font selected in your browser preferences contains such a character.

The fifth column contains a description of the character, and an occasional note. You can either hover over the note link to see the note, or click it to go the notes page, which will open in a separate window.

There are many ways to order character entities. You can order them alphabetically, by number, or by Unicode collection, to mention just a few methods. I find all of these rather arbitrary. So, I have taken the liberty of classifying them into what I consider logical categories, and sometimes subcategories, and then by alphabetical order. I hope you find it useful. And don't forget, you can always use your browser's Find command to find a particular word or phrase within this page.

For more information on how to use these entities in your Web pages, see HTML, XHTML, and CSS, Sixth Edition, Visual QuickStart Guide, by Elizabeth Castro.

This article comes from Ravens PHP Scripts

The URL for this story is: