<codeph>

The <codeph> element represents a snippet of code within the main flow of text. The code phrase is displayed in a monospaced font for emphasis. This element is part of the DITA programming domain, a special set of DITA elements designed to document programming tasks, concepts, and reference information.

Content models

See appendix for information about this element in OASIS document type shells.

Inheritance

+ topic/ph pr-d/codeph

Example

This section is non-normative.

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

Content model

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

Contained by

<synph>

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

Contained by

  • <synph>

Inheritance

+ topic/ph pr-d/codeph

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

Attributes

The following attributes are available on this element: Universal attribute group, outputclass, and @keyref.