24.4.6.1 Specifying a value for the id attribute

To specify an ID for a block element, place a DITAElemID PI marker in the paragraph. The content of the marker is the value of the id attribute. When you place a DITAElemID PI marker at the start of a topic, the content of the marker becomes the id attribute of the <title> element for that topic.

Note:  For an embedded topic (as opposed to a block element), you must use a DITATopicID PI marker instead; see §24.8.3 Specifying the ID for a DITA topic.

Note:  The id attribute value must start with a letter. 

DITA2Go provides a default id attribute for each of the following block elements:

<table> (all types)

<fig> (but not <image>)

<section>

<example>

<refsyn>

<fn>

<li>

Links to any of these elements automatically pick up the id attribute, and also the correct type attribute of the element. For links to other elements, you have to insert either a PI marker or a DITAElemID PI marker in the target paragraph, and specify the link type attribute with a DITALinkType PI marker; see §24.9.5.3 Specifying the <xref> type attribute.

Interpolated parent id attribute

When the parent of the current block element is interpolated by DITA2Go (see §24.4.1 Understanding how DITA2Go delimits DITA elements), you cannot use a DITAElemID PI marker to specify an ID for that parent.

To specify an ID for the parent of the current block element, place a DITAParentID PI marker in the element, with content as follows:

parentname=parentid

Do not include spaces around the equals sign.

Previous Topic:  24.4.6 Assigning attributes to DITA elements

Next Topic:  24.4.6.2 Including an id attribute in every element

Parent Topic:  24.4.6 Assigning attributes to DITA elements

Sibling Topics:

24.4.6.2 Including an id attribute in every element

24.4.6.3 Specifying attribute values for the root element of a topic

24.4.6.4 Specifying attribute values for a block element or parent

24.4.6.5 Specifying attribute values for an inline element

24.4.6.6 Providing outputclass attributes for all elements