<codeph>
A code phrase is a small portion of source code, machine code, or text that is displayed in-line.
Rendering expectations
The content of the <codeph>
element is typically rendered in a
monospaced font.
Specialization hierarchy
The <codeph>
element is specialized from <ph>
. It is
defined in the programming domain module.
Content model
(Text | <cite>
| <include>
| <keyword>
| <ph>
| <q>
| <term>
| <text>
| <xref>
| <data>
| <draft-comment>
| <foreign>
| <required-cleanup>
)*
Contained by
- Text
<cite>
<data>
<draft-comment>
<foreign>
<include>
<keyword>
<ph>
<q>
<required-cleanup>
<term>
<text>
<xref>
Contained by
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
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.
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>