<codeph>

A code phrase is a small portion of source code, machine code, or text that is displayed in-line.

The content of the <codeph> element is typically rendered in a monospaced font.

The <codeph> element is specialized from <ph>. It is defined in the programming domain module.

(Text | <cite> | <include> | <keyword> | <ph> | <q> | <term> | <text> | <xref> | <data> | <draft-comment> | <foreign> | <required-cleanup>)*

Contained by

<synph>

Zero or more of the following
  • Text
  • <cite>
  • <data>
  • <draft-comment>
  • <foreign>
  • <include>
  • <keyword>
  • <ph>
  • <q>
  • <required-cleanup>
  • <term>
  • <text>
  • <xref>

Contained by

+ topic/ph pr-d/codeph

The <codeph> element is specialized from <ph>. It is defined in the pr-domain module.

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.

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.

In the following code sample, the <codeph> element identifies a code snippet. The code snippet will be rendered in-line in the paragraph.

<p>The second line of the sample program code, <codeph>Do forever</codeph>, 
represents the start of a loop construct.</p>