DTD – Entities

To define shortcuts to special characters, the entities are used which can be declared either internal or external. There are three parts of an entity:

  • An ampersand (&)
  • An entity name
  • A semicolon (;)

An Internal Entity Declaration:

Syntax:


Example:

DTD Example:



XML example:

&writer;©right;

An External Entity Declaration:

Syntax:


Example:

DTD Example:



XML example:

&writer;©right;