Admonitions
On this page, you’ll learn:
-
How to mark up an admonition with AsciiDoc.
-
How to create an admonition with complex content.
1. Admonition styles
An admonition, also known as a notice, helps draw attention to content with a special label or icon. There are five built-in admonition labels.
-
NOTE
-
TIP
-
IMPORTANT
-
CAUTION
-
WARNING
2. Basic admonition
If the admonition content is not interrupted by blank lines, start the first line with a style label.
The label must be all uppercase and followed by a colon (:
) and a single blank space.
CAUTION: Don't stick forks in electric sockets. TIP: After someone sticks a fork in a socket, you'll need to reset the circuit in the dark basement. WARNING: Never go into the basement. IMPORTANT: A monster lives in the basement. NOTE: If you go into the basement, see if you can find Kenny's parka.
The result of Basic admonition syntax is displayed below.
Don’t stick forks in electric sockets. |
After someone sticks a fork in a socket, you’ll need to reset the circuit in the dark basement. |
Never go into the basement. |
A monster lives in the basement. |
If you go into the basement, see if you can find Kenny’s parka. |
3. Complex admonition
If the admonition content includes elements separated by blank lines, place the content in a delimited example block (====
).
This behavior is referred to as masquerading.
Place the appropriate label, in all uppercase, on the block in an attribute list ([]
).
[IMPORTANT] .Optional Title ==== Use an example block to create an admonition that contains complex content, such as (but not limited to): * Lists * Multiple paragraphs * Source code * Images ====
The result of Complex admonition syntax is displayed below.
Optional Title
Use an example block to create an admonition that contains complex content, such as (but not limited to):
|