Chapter 14. AttributeList Element

An AttributeList block element is an attribute list on a line by itself:

14.1. Attribute value substitution

By default, only substitutions that take place inside attribute list values are attribute references, this is because not all attributes are destined to be marked up and rendered as text (for example the table cols attribute). To perform normal inline text substitutions (special characters, quotes, macros, replacements) on an attribute value you need to enclose it in single quotes. In the following quote block the second attribute value in the AttributeList is quoted to ensure the http macro is expanded to a hyperlink.

[quote,'[Samuel Johnson]']
Sir, a woman's preaching is like a dog's walking on his hind legs. It
is not done well; but you are surprised to find it done at all.

14.2. Common attributes

Most block elements support the following attributes:

Name Backends Description


html4, html5, xhtml11, docbook

Unique identifier typically serve as link targets. Can also be set by the BlockId element.


html4, html5, xhtml11, docbook

Role contains a string used to classify or subclassify an element and can be applied to AsciiDoc block elements. The AsciiDoc role attribute is translated to the role attribute in DocBook outputs and is included in the class attribute in HTML outputs, in this respect it behaves like the quoted text role attribute.

DocBook XSL Stylesheets translate DocBook role attributes to HTML class attributes; CSS can then be used to style the generated HTML.



reftext is used to set the DocBook xreflabel attribute. The reftext attribute can an also be set by the BlockId element.



floatstyle is used to specify the floatstyle attribute for the titled table, example, image and equation blocks. This is useful when used in conjunction with the dblatex toolchain. A typical example would be to specify the value as floatstyle="[htbp]".