HTML and CSS Reference
The first version creates a general entity; the second, because of the
percent sign, creates a parameter entity.
For both entity types, the name is simply a sequence of characters be-
ginning with a letter, colon, or underscore and followed by any combin-
ation of letters, numbers, periods, hyphens, underscores, or colons. The
only restriction is that names may not begin with a symbol other than
the colon or underscore, or the sequence "xml" (either upper- or lower-
The entity value is either a character string within quotes (unlike HTML
markup, you must use quotes even if it is a string of contiguous letters)
or a reference to another document containing the value of the entity.
For these external entity values, you'll find either the keyword SYSTEM ,
followed by the URL of the document containing the entity value, or the
keyword PUBLIC , followed by the formal name of the document and its
A few examples will make this clear. Here is a simple general entity de-
<!ENTITY fruit "kumquat or other similar citrus fruit">
In this declaration, the entity " &fruit; " within the document is replaced
with the phrase "kumquat or other similar citrus fruit" wherever it ap-
Similarly, here is a parameter entity declaration:
<!ENTITY % ContentType "CDATA">
Anywhere the reference %ContentType; appears in your DTD, it is re-
placed with the word CDATA. This is the typical way to use parameter
entities: to create a more descriptive term for a generic parameter that
will be used many times in a DTD.