Assign an ID
You can assign an ID to any block using an attribute list. Once you’ve assigned an ID to a block, you can use that ID to link to it using a cross reference.
Block ID syntax
An ID is assigned to a block by prefixing the ID value with a hash (
#) and placing it in the block’s attribute list.
[#the-id-of-this-block] ==== Content of delimited example block ====
Let’s go through some examples of assigning an ID to a block with several attributes, a title, and delimiters.
Assign an ID to a block with attributes
In this section, we’ll assign an ID to this blockquote:
Roads? Where we’re going, we don’t need roads.
Back to the Future
When the style attribute is explicitly assigned to a block, the style name is always placed in the first position of the attribute list. Then, the ID is attached directly to the end of the style name.
The blockquote with an assigned style and ID in Example 1 shows this order of attributes.
[quote#roads] Roads? Where we're going, we don't need roads.
Since Example 1 is a blockquote it should have some attribution and citation information.
In Example 2, let’s attribute this quote to its speaker and original context using the positional attribution attributes that are built into the
[quote#roads,Dr. Emmett Brown,Back to the Future] Roads? Where we're going, we don't need roads.
Except when the
options attributes are assigned values using their shorthand syntax (
%, respectively), all other block attributes are typically separated by commas (