title: Zettelmarkup: Links role: manual tags: #manual #zettelmarkup #zettelstore syntax: zmk back: 00001006020000 00001007010000 00001007031100 00001007031140 00001007040300 00001007040320 00001007040324 00001007040350 00001007906000 00001007990000 backward: 00001006020000 00001007010000 00001007031100 00001007031140 00001007040300 00001007040320 00001007040324 00001007040350 00001007906000 00001007990000 box-number: 1 copyright: (c) 2020-present by Detlef Stern created: 20210810155955 forward: 00001004010000 00001006050000 00001007040000 00001007700000 lang: en license: EUPL-1.2-or-later modified: 20221024173849 published: 20221024173849 visibility: public There are two kinds of links, regardless of links to (internal) other zettel or to (external) material. Both kinds begin with two consecutive left square bracket characters ([, U+005B) and ends with two consecutive right square bracket characters (], U+005D). If the content starts with more than two left square bracket characters, all but the last two will be treated as text. The first form provides some text plus the link specification, delimited by a vertical bar character (|, U+007C): `[[text|linkspecification]]`. The text is a sequence of [inline elements](00001007040000). However, it should not contain links itself. The second form just provides a link specification between the square brackets. Its text is derived from the link specification, e.g. by interpreting the link specification as text: `[[linkspecification]]`. # Link specifications The link specification for another zettel within the same Zettelstore is just the [zettel identifier](00001006050000). To reference some content within a zettel, you can append a number sign character (#, U+0023) and the name of the mark to the zettel identifier. The resulting reference is called zettel reference. If the link specification begins with the string query:, the text following this string will be interpreted as a [query expression](00001007700000). The resulting reference is called query reference. When this type of references is rendered, it will typically reference a list of all zettel that fulfills the query expression. A link specification starting with one slash character (/, U+002F), or one or two full stop characters (., U+002E) followed by a slash character, will be interpreted as a local reference, called *hosted reference*. Such references will be interpreted relative to the web server hosting the Zettelstore. If a link specification begins with two slash characters (called *based reference*), it will be interpreted relative to the value of [url-prefix](00001004010000#url-prefix). To specify some material outside the Zettelstore, just use an normal Uniform Resource Identifier (URI) as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986). # Other topics If the link references another zettel, and this zettel is not readable for the current user, because of a missing access rights, then only the associated text is presented.