Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
service
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
Freenet DSL
Who's Online
12 user(s) are online (9 user(s) are browsing encyclopedia)

Members: 0
Guests: 12

more...
partner

List of XML and HTML character entity references

In . This article lists the character entity references that are valid in HTML and XML documents.

= Character reference overview =

A numeric character reference refers to a character by its Universal Character Set/Unicode code point , and uses the format

:&# nnnn ; or :&#x hhhh ;

where nnnn is the code point in decimal form, and hhhh is the code point in hexadecimal form.

In contrast, a character entity reference refers to a character by the name of an SGML entity which has the desired character as its replacement text . The entity must either be predefined (built-in to the markup language) or explicitly declared in a Document Type Definition (DTD). The format is the same as for any entity reference:

:&# name ;

where name is the name of the entity.

= XML and HTML character entities =

The XML specification defines five built-in character entities and requires that all XML processors honor them. The entities can be explicitly declared in a DTD, as well, but if this is done, the replacement text must be the same as the built-in definitions.

The HTML 4 DTD explicitly declares 252 character entities. HTML processors must honor the HTML DTD s declarations, even if the DTD is not mentioned in the HTML document.

The XHTML DTDs explicitly declare the same 252 character entities as HTML, but the processing situation is different. XML processors that are reading XHTML documents must follow standard XML parsing procedures, so if they opt not to read external DTDs, then there is a chance that only the five built-in entities of XML will be honored; references to entities that were declared in external DTDs might not be supported. XHTML document authors who choose to use character entity references must ensure that the document is going to be processed by a parser that is willing to read external entities, or the character entities must be declared in the internal DTD subset.

= List of XML character entity references =

In the tables below, the XML and HTML predefined named entities are listed. In the case of XML, additional named entities may be defined. The Name column mentions the character entity s name. The Character column shows the character, if it is renderable. In order to render the character, the format &name; is used; for example, © renders as ©. The Unicode code point column cites the character via standard UCS/Unicode U+ notation, which shows the character s code point in hexadecimal. The decimal equivalent of the code point is then shown in parentheses. The Standard column indicates the first version that includes the entity. The Description column cites the character via its canonical UCS/Unicode name, in English.

= List of HTML character entity references =

The Standard column mentions the major releases of the HTML spec: 2.0, 3.2, and 4.0. HTML 4.01 didn t introduce any new entities after HTML 4.0.

HTML document authors who have been exposed to XML and XHTML often overlook the fact that the apos entity is not defined in HTML.

= See also =

  • Character encodings in HTML
  • SGML entity
  • = Special characters =

    = References =

  • [http://www.unicode.org/ Unicode Consortium]. See also: Unicode Consortium
  • [http://www.unicode.org/Public/UNIDATA/UnicodeData.txt UnicodeData.txt from the Unicode Consortium]
  • [http://www.w3.org/ World Wide Web Consortium]. See also: World Wide Web Consortium
  • [http://www.w3.org/TR/REC-xml/ XML 1.0 spec]
  • [http://www.w3.org/MarkUp/html-spec/html-spec_toc.html HTML 2.0 spec]
  • [http://www.w3.org/TR/REC-html32 HTML 3.2 spec]
  • [http://www.w3.org/TR/1998/REC-html40-19980424/ HTML 4.0 spec]
  • [http://www.w3.org/TR/REC-html40/ HTML 4.01 spec]