3.2.6.2.4 codeph

The code phrase (<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.

Contains

Doctype

Content model

topic (technical content), map (technical content), concept, ditabase, glossary, glossentry, glossgroup, reference, task, bookmap

( text data or boolean or cite or keyword or apiname or option or parmname or cmdname or msgnum or varname or wintitle or ph or b or i or sup or sub or tt or u or codeph or synph or filepath or msgph or systemoutput or userinput or menucascade or uicontrol or q or term or abbreviated-form or xref or state or data or data-about or foreign or unknown) (any number)

Contained by

Doctype

Content model

topic (technical content), concept

data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, figgroup, pre, lines, ph, alt, stentry, draft-comment, fn, cite, xref, entry, source, searchtitle, abstract, bodydiv, section, sectiondiv, example, linktext, linkinfo, b, u, i, tt, sup, sub, typeofhazard, consequence, howtoavoid, screen, codeph, codeblock, synph, pt, pd, fragref, synnote

map (technical content)

data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, figgroup, pre, lines, ph, alt, stentry, draft-comment, fn, cite, xref, entry, source, linktext, b, u, i, tt, sup, sub, typeofhazard, consequence, howtoavoid, screen, codeph, codeblock, synph, pt, pd, fragref, synnote

ditabase

data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, figgroup, pre, lines, ph, alt, stentry, draft-comment, fn, cite, xref, entry, source, searchtitle, abstract, bodydiv, section, sectiondiv, example, linktext, linkinfo, prereq, context, steps-informal, stepsection, cmd, info, tutorialinfo, stepxmp, choice, choptionhd, chdeschd, choption, chdesc, stepresult, result, postreq, refsyn, proptypehd, propvaluehd, propdeschd, proptype, propvalue, propdesc, glossterm, glossdef, glossProperty, glossUsage, glossScopeNote, b, u, i, tt, sup, sub, typeofhazard, consequence, howtoavoid, screen, codeph, codeblock, synph, pt, pd, fragref, synnote

glossary, glossentry, glossgroup

data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, figgroup, pre, lines, ph, alt, stentry, draft-comment, fn, cite, xref, entry, source, searchtitle, abstract, bodydiv, section, sectiondiv, example, linktext, linkinfo, glossterm, glossdef, glossProperty, glossUsage, glossScopeNote, b, u, i, tt, sup, sub, typeofhazard, consequence, howtoavoid, screen, codeph, codeblock, synph, pt, pd, fragref, synnote

reference

data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, figgroup, pre, lines, ph, alt, stentry, draft-comment, fn, cite, xref, entry, source, searchtitle, abstract, bodydiv, section, sectiondiv, example, linktext, linkinfo, refsyn, proptypehd, propvaluehd, propdeschd, proptype, propvalue, propdesc, b, u, i, tt, sup, sub, typeofhazard, consequence, howtoavoid, screen, codeph, codeblock, synph, pt, pd, fragref, synnote

task (strict), task (general)

data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, figgroup, pre, lines, ph, alt, stentry, draft-comment, fn, cite, xref, entry, source, searchtitle, abstract, bodydiv, section, sectiondiv, example, linktext, linkinfo, prereq, context, steps-informal, stepsection, cmd, info, tutorialinfo, stepxmp, choice, choptionhd, chdeschd, choption, chdesc, stepresult, result, postreq, b, u, i, tt, sup, sub, typeofhazard, consequence, howtoavoid, screen, codeph, codeblock, synph, pt, pd, fragref, synnote

bookmap

data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, figgroup, pre, lines, ph, alt, stentry, draft-comment, fn, cite, xref, entry, source, linktext, booklibrary, mainbooktitle, booktitlealt, organizationname, b, u, i, tt, sup, sub, typeofhazard, consequence, howtoavoid, screen, codeph, codeblock, synph, pt, pd, fragref, synnote

Inheritance

+ topic/ph pr-d/codeph

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

Name

Description

Data Type

Default Value

Required?

univ-atts attribute group (includes select-atts, id-atts, and localization-atts groups)

A set of related attributes, described in 3.4.1.3 univ-atts attribute group

     

global-atts attribute group (xtrf, xtrc)

A set of related attributes, described in 3.4.1.2 global-atts attribute group

     

class, outputclass

Common attributes described in 3.4.1.9 Other common DITA attributes

     

Previous Topic:  3.2.6.2.3 coderef

Next Topic:  3.2.6.2.5 option

Parent Topic:  3.2.6.2 Programming elements

Sibling Topics:

3.2.6.2.1 apiname

3.2.6.2.2 codeblock

3.2.6.2.3 coderef

3.2.6.2.5 option

3.2.6.2.6 parmname

3.2.6.2.7 parml

3.2.6.2.8 plentry

3.2.6.2.9 pt

3.2.6.2.10 pd

3.2.6.2.11 synph

3.2.6.2.12 syntaxdiagram

3.2.6.2.13 groupseq

3.2.6.2.14 groupchoice

3.2.6.2.15 groupcomp

3.2.6.2.16 fragment

3.2.6.2.17 fragref

3.2.6.2.18 synblk

3.2.6.2.19 synnote

3.2.6.2.20 synnoteref

3.2.6.2.21 kwd

3.2.6.2.22 var

3.2.6.2.23 oper

3.2.6.2.24 delim

3.2.6.2.25 sep

3.2.6.2.26 repsep