The Options Attribute

The options attribute is a versatile named attribute that can contain a comma-separated list of values. It can also be defined globally as an attribute entry.

Block Assignment

In an attribute list, there are three ways to assign an options attribute to a block element.

  1. Prefixing the value with a percent sign (%).

  2. Specifying the value with opts=<name>

  3. Specifying the value with options=<name>.

Consider a table block with the three option values header, footer, and autowidth.

Here’s how the options are assigned to the table using options.

Formal syntax
[options="header,footer,autowidth"]
|===
| Cell A | Cell B
|===

Here’s how the options are assigned to the table using the shorthand notation (%).

Shorthand syntax
[%header%footer%autowidth]
|===
| Cell A | Cell B
|===

Let’s consider the options when combined with other attributes.

Shorthand syntax
[horizontal.properties%step]
property 1:: does stuff
property 2:: does different stuff
Formal syntax
[horizontal, role="properties", options="step"]
property 1:: does stuff
property 2:: does different stuff