DITA Resource Center

The role attribute

The role attribute defines the role the target topic plays in relationship with the current topic. For example, in a parent/child relationship, the role would be "parent" when the target is the parent of the current topic, and "child" when the target is the child of the current topic. This structure could be used to sort and classify links at display time.

Supported values

Allowable values for the role attribute are:

parent
Indicates a link to a topic that is a parent of the current topic.
child
Indicates a link to a direct child such as a directly nested or dependent topic.
sibling
Iindicates a link between two children of the same parent topic.
friend
Indicates a link to a similar topic that is not necessarily part of the same hierarchy.
next
Indicates a link to the next topic in a sequence.
previous
Indicates a link to the previous topic in a sequence.
cousin
Indicates a link to another topic in the same hierarchy that is not a parent, child, sibling, next, or previous.
ancestor
Indicates a link to a topic above the parent topic.
descendant
Indicates a link to a topic below a child topic.
sample
Deprecated.
external
Deprecated--use the scope="external" attribute to indicate external links.
other
Indicates any other kind of relationship or role. Enter that role as the value for the otherrole attribute.
-dita-use-​conref-​target
See Using the -dita-use-conref-target value for more information.

Was this page helpful?