SGML entity

In the Standard Generalized Markup Language (SGML), an entity is a primitive data type, which associates a string with either a unique alias (such as a user-specified name) or an SGML reserved word (such as #DEFAULT).

The SGML specification defines numerous entity types, which are distinguished by keyword qualifiers and context.

For example: Additional markup constructs and processor options may affect whether and how entities are processed.

Standard entity sets for SGML and some of its derivatives have been developed as mnemonic devices, to ease document authoring when there is a need to use characters that are not easily typed or that are not widely supported by legacy character encodings.

XHTML has the same five as XML, but if its DTDs are explicitly used, then it has 253 (' being the extra entity beyond those in HTML 4).