Begin site navigation:
Jump to Section Topics | Jump to Page Content | Contact Us | DenverGov Home
City and County of Denver Web Accessibility Guidelines
End site navigation.
HTML Techniques
Begin left menu:
Section Topics
End of left menu.
Tech Spotlight
assistive technology photo: Large-print keyboard with Braille.

Begin main content:

Character Entities

There is an attribute at the beginning of most HTML documents that Web developers typically include without much thought as to its purpose:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

Within this <META> element, the "CHARSET" attribute establishes the character set for the document. Most likely the following character set is used: ISO-8859-1 (Latin-1). However, others exist, for example, UTF-8 (Unicode), iso-2022-jp (Japanese), iso-8859-2 (Central European), etc.

It is very important that the character encoding of any HTML document is clearly labeled. Doing so ensures that the Web browser or display device can accurately interpret certain characters within your document and read the page according to the correct language.

Even so, some characters may not be fully expressed, and others can cause the browser to misinterpret the HTML code. Defining certain characters by their numeric or character entity references helps ensure that the characters will be adequately interpreted by the browser.

RECOMMENDED:

Three character entity references should be used to ensure that pages do not break when interpreted by some display devices, particularly older Web browsers:

Web developers who wish to use the "<" character within text should use "&lt;" instead to avoid possible confusion with the beginning of a tag. Similarly, developers should use "&gt;" instead of ">" to avoid possible confusion with the end of a tag. Additionally, "&amp;" should be used instead of "&" to avoid confusion with the beginning of a character entity reference or script.

The use of entity references for other characters, particularly those that are specific to foreign languages, currency symbols, trademark and copyright signs, quote marks, slash marks, accents, and such is also highly recommended.

EXAMPLE:

The following text demonstrates the proper use of character entity references:

Price comparison:
Johnson&Sons > Widget Corporation
Supply, Inc. < Widget Corporation

Code:
Price comparison:
Johnson&amp;Sons &gt; Widget Corporation
Supply, Inc. &lt; Widget Corporation

End of main content.
Begin page footer:
Validate the structure of this page: XHTML | CSS |
Check the accessibility of this page: WAVE | Bobby | Cynthia|
End of page.