<numcharref>

A numeric character reference is a common markup construction that is used in markup languages such as HTML, SGML, and XML. It consists of a short sequence of characters that represents a single character.

Usage information

The content of the <numcharref> element should be the numeric value without any leading or trailing characters, for example, 10 or x0a.

Rendering expectations

The contents of the <numcharref> element is typically rendered with a leading ampersand (&) and a trailing semi-colon (;).

Specialization hierarchy

The <numcharref> element is specialized from <markupname>; the <numcharref> element is defined in the XML-mention domain module. The <markupname> element is specialized from <keyword>, and the <markupname> element is defined in the markup-name domain module.

Content model

(Text | <draft-comment> | <required-cleanup> | <text> )*

Zero or more
  • Text
  • <draft-comment>
  • <required-cleanup>
  • <text>

Attributes

The following attributes are available on this element: universal attributes and @keyref.

The following attributes are available on this element: universal attributes and the attributes defined below.

@keyref
Specifies a key name that acts as a redirectable reference based on a key definition within a map. See STUB CONTENT for information on using this attribute.

For HDITA, the equivalent of @keyref is @data-keyref

Example

This section is non-normative.

The following code sample shows how a <numcharref> element can be used to tag the numeric character reference for the a-acute Unicode character:

<p>Numeric character references represent characters from the Universal
Character Set (UCS) of Unicode. They are used to reference characters  that 
cannot easily be directly encoded in a document, such as a copyright 
symbol. When a markup-aware processor encounters a numeric character 
reference, for example, <numcharref>225</numcharref>, it renders the 
reference as the Unicode character that it represents: lower-case a with acute.</p>