Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Lightweight markup language
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Link syntax === Hyperlinks can either be added inline, which may clutter the code because of long URLs, or with named <code>alias</code> or numbered <code>id</code> references to lines containing nothing but the address and related attributes and often may be located anywhere in the document. Most languages allow the author to specify text <code>Text</code> to be displayed instead of the plain address <code>http://example.com</code> and some also provide methods to set a different link title <code>Title</code> which may contain more information about the destination. LMLs that are tailored for special setups, e.g. wikis or code documentation, may automatically generate named anchors (for headings, functions etc.) inside the document, link to related pages (possibly in a different namespace) or provide a textual search for linked keywords. Most languages employ (double) square or angular brackets to surround links, but hardly any two languages are completely compatible. Many can automatically recognize and parse absolute URLs inside the text without further markup. {| class="wikitable sortable" |+ Hyperlink syntax ! Languages ! Basic syntax !! Text syntax !! Title syntax |- ! AsciiDoc |rowspan=5| <code><nowiki>http://example.com[Text]</nowiki></code> |<code><nowiki>http://example.com</nowiki></code> | <!--single square brackets--> |- ! BBCode<!-- some implementations only -->, Creole, MediaWiki, PmWiki | |- ! Slack | <code><nowiki><http://example.com|Text></nowiki></code> || |- ! Textile |rowspan=2| <code><nowiki>"Text":http://example.com</nowiki></code> | <code><nowiki>"Text (Title)":http://example.com</nowiki></code> |- ! Texy! | <code><nowiki>"Text .(Title)":http://example.com</nowiki></code> |- ! Jira |rowspan=3| <code><nowiki>[http://example.com]</nowiki></code> | <code><nowiki>[Text|http://example.com]</nowiki></code> | |- ! MediaWiki | <code><nowiki>[http://example.com Text]</nowiki></code> | |- ! txt2tags | <code><nowiki>[Text http://example.com]</nowiki></code> | |- ! Creole, MediaWiki, PmWiki, DokuWiki |rowspan=3| <code><nowiki>[[Name]]</nowiki></code> | <code><nowiki>[[Name|Text]]</nowiki></code> | |- ! Org-mode | <code><nowiki>[[Name][Text]]</nowiki></code> | |- ! TiddlyWiki | <code><nowiki>[[Text|Name]]</nowiki></code> | |- ! Creole |rowspan=2| <code><nowiki>[[Namespace:Name]]</nowiki></code> | <code><nowiki>[[Namespace:Name|Text]]</nowiki></code> | |- ! Org-mode | <code><nowiki>[[Namespace:Name][Text]]</nowiki></code> | |- ! Creole, PmWiki | <code><nowiki>[[http://example.com]]</nowiki></code> | <code><nowiki>[[http://example.com|Text]]</nowiki></code> | |- ! BBCode | <code><nowiki>[url]http://example.com[/url]</nowiki></code> | <code><nowiki>[url=http://example.com]Text[/url]</nowiki></code> | <!--angular brackets--> |- ! Markdown |rowspan=2| <code><nowiki><http://example.com></nowiki></code> | <code><nowiki>[Text](http://example.com)</nowiki></code> | <code><nowiki>[Text](http://example.com "Title")</nowiki></code> |- ! reStructuredText | <code><nowiki>`Text <http://example.com/>`_</nowiki></code> | |- ! Gemtext | <code><nowiki>=> gemini://example.com</nowiki></code> |colspan=2| <code><nowiki>=> gemini://example.com Text</nowiki></code> |- ! POD | <code><nowiki>L<http://example.com/></nowiki></code> | <code><nowiki>L</Name></nowiki></code> | |- ! setext | | <code><nowiki>^.. _Link_name URL</nowiki></code> | |- |} Gemtext and setext links must be on a line by themselves, they cannot be used inline. {| class="wikitable sortable" |+ Reference syntax ! Languages ! Text syntax !! Title syntax <!--reference line--> |- !rowspan=2| AsciiDoc | <syntaxhighlight lang="md">β¦ [[id]] β¦ <<id>></syntaxhighlight> | <syntaxhighlight lang="md">β¦ [[id]] β¦ <<id,Text>></syntaxhighlight> |- | <syntaxhighlight lang="md">β¦ anchor:id β¦ xref:id</syntaxhighlight> | <syntaxhighlight lang="md">β¦ anchor:id β¦ xref:id[Text]</syntaxhighlight> |- !rowspan=3| Markdown | <syntaxhighlight lang="md">β¦ [Text][id] β¦ [id]: http://example.com</syntaxhighlight> | <syntaxhighlight lang="md">β¦ [Text][id] β¦ [id]: http://example.com "Title"</syntaxhighlight> |- | <syntaxhighlight lang="md">β¦ [Text][] β¦ [Text]: http://example.com</syntaxhighlight> | <syntaxhighlight lang="md">β¦ [Text][] β¦ [Text]: http://example.com "Title"</syntaxhighlight> |- | <syntaxhighlight lang="md">β¦ [Text] β¦ [Text]: http://example.com</syntaxhighlight> | <syntaxhighlight lang="md">β¦ [Text] β¦ [Text]: http://example.com "Title"</syntaxhighlight> |- ! reStructuredText | <syntaxhighlight lang="rest">β¦ Name_ β¦ .. _Name: http://example.com</syntaxhighlight> | |- ! setext | <pre>β¦ Link_name_ β¦ ^.. _Link_name URL</pre> | |- ! Textile | <pre>β¦ "Text":alias β¦ [alias]http://example.com</pre> | <pre>β¦ "Text":alias β¦ [alias (Title)]http://example.com</pre> |- ! Texy! | <pre>β¦ "Text":alias β¦ [alias]: http://example.com</pre> | <pre>β¦ "Text":alias β¦ [alias]: http://example.com .(Title)</pre> |} Org-mode's normal link syntax does a text search of the file. You can also put in dedicated targets with <code><<id>></code>.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)