title: Zettelmarkup: Headings role: manual tags: #manual #zettelmarkup #zettelstore syntax: zmk back: 00001007010000 00001007030000 00001007040324 00001007721200 00001007800000 00001007906000 00001007990000 backward: 00001007010000 00001007030000 00001007040324 00001007721200 00001007800000 00001007906000 00001007990000 box-number: 1 copyright: (c) 2020-present by Detlef Stern created: 20210126175322 forward: 00001007040000 lang: en license: EUPL-1.2-or-later modified: 20220218133755 published: 20220218133755 visibility: public To specify a (sub-) section of a zettel, you should use the headings syntax: at the beginning of a new line type at least three equal signs (""''=''"", U+003D), plus at least one space and enter the text of the heading as [[inline elements|00001007040000]]. ```{="zmk"} === Level 1 Heading ==== Level 2 Heading ===== Level 3 Heading ====== Level 4 Heading ======= Level 5 Heading ======== Level 5 Heading ``` This renders in HTML as: :::{="example"} === Level 1 Heading ==== Level 2 Heading ===== Level 3 Heading ====== Level 4 Heading ======= Level 5 Heading ======= Level 5 Heading ::: === Notes The heading level is translated to a HTML heading by adding 1 to the level, e.g. ``=== Level 1 Heading``{="zmk"} translates to ==

Level 1 Heading

=={="html"}. The ==

=={="html"} tag is rendered for the zettel title. This syntax is often used in a similar way in wiki implementation. However, trailing equal signs are __not__ removed, they are part of the heading text. If you use command line tools, you can easily create a draft table of contents with the command: ```{="sh"} grep -h '^====* ' ZETTEL_ID.zettel ```