<option>

The <option> element specifies a permitted value for a parameter or configuration.

Specialization hierarchy

The <option> element is specialized from <keyword>. It is defined in the programming domain module.

Content model

(Text | <text> )*

Zero or more
  • Text
  • <text>

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.

This section contains examples of how the <option> element can be used.

Example 1. Parameter values

In the following code sample, the <option> element is used to specify permitted values for a parameter:

<p> You can use the <parmname>map-order</parmname> parameter to specify 
if the order of the frontmatter and backmatter content is retained. The allowed 
values are <option>keep</option> and <option>trash</option>; the default value is 
<option>trash</option>.</p>
Example 2. Configuration option

In the following code sample, the <option> element is used to specify an option that modifies a configuration:

<p>You can purchase the <option>Sports Model</option> package in order
to configure your automobile with the latest sports suspension, bonnet stripes, 
a roof spoiler and an aero body kit.</p>