9

I was trying to direct a person to the tour when I realized that I did not know how to put links in comments. How do I do it?

2
  • I don't know, and I wish I knew. Also in chat messages. I usually just put a bare url surrounded by whitespace, which gets linked, but then I don't get to specify the link text. I don't use the bracket-parenthesis syntax by principle, because it doesn't work for urls that contain a closing parenthesis.
    – b_jonas
    Feb 8 '17 at 21:08
  • @b_jonas it does, you just have to put a second one after the link. (Example)
    – Mithical Mod
    Feb 8 '17 at 21:16
12

[link text](http://example.com) is how you do it. It works in posts too.

If you go to post a comment, there is a link to a 'help' page. That page1 says:

Comments support only bold, italic, code and links; in addition, a few shorthand links are available.

_italic_ and **bold** text, inline code in backticks, and [basic links](http://example.com). Supported shorthand links:

[meta] – link to the current site's Meta; link text is the site name (e.g. "Super User Meta"). Does nothing if the site doesn't have (or already is) a Meta site.

[main] – like [meta], just the other way around.

[edit] – link to the edit page for the post the comment is on, i.e. /posts/{id}/edit. Link text is "edit" (capitalization is respected).

[tag:tagname] and [meta-tag:tagname] – link to the given tag's page. Link text is the name of the tag.meta-tag only works on meta sites.

[help], [help/on-topic], [help/dont-ask], [help/behavior] and [meta-help] – link to frequently visited pages of the help center. Link text is "help center" (capitalization is respected). All links point to the main site.

[tour] – link to the Tour page. Link text is "tour" (capitalization is respected).

[so], [pt.so], [su], [sf], [metase], [a51], [se] – link to the given site. Link text is the site name.

[chat] – link to the current site's chat site, the link text being "{site name} Chat".

[ask], [answer] – link to the How to Ask or How to Answer page.

[something.se] – link to something.stackexchange.com, if that site exists. Link text is the site name. Use [ubuntu.se] for Ask Ubuntu.


1I used [that page](https://literature.meta.stackexchange.com/editing-help#comment-formatting) here...

1
  • Cool! I've been doing links the hard way. :-]
    – Mick
    Feb 8 '17 at 20:32
7

From main meta:

  • [meta] – link to the current site's Meta; link text is the site name, "Literature Meta". Does nothing in comments on Meta itself.

  • [main] – like [meta], just the other way around.

  • [edit] – link to the edit page for the post the comment is on, i.e. /posts/{id}/edit. Link text is "edit" (capitalisation is respected).

  • [help] should be obvious. [meta-help] links to "What is meta?" (/help/whats-meta), [help/on-topic] links to "What topics can I ask about here?" (/help/on-topic), [help/dont-ask] links to "What types of questions should I avoid asking?" (/help/dont-ask), [help/behavior] links to "What kind of behavior is expected of users?" (/help/behavior). Link text for all of these is "help center" .

  • [tour] and [meta-tour] – equivalent to the FAQ version, but links to the site's Tour page (resp. the meta site's Tour page). Link text is "tour" (capitalization is respected). Legacy names [about] and [meta-about] are still supported.

  • [ask], [answer] – link to the "How to Ask" / "How to Answer" page.

  • [so], [su], [sf], [metase]/[meta.se], [a51], [se] – link to the given site (Stack Overflow, Super User, Server Fault, Meta Stack Exchange, Area 51, the Stack Exchange portal). Link text is the site name.

  • [something.se] – link to something.stackexchange.com, if that site exists. Link text is the site name. Use [ubuntu.se] for Ask Ubuntu. [meta.something.se] links to the meta site.

  • [chat] – link to the current site's chat site, http://chat.stackexchange.com/, showing a list of active rooms from the referring site), the link text being "Literature Chat".

Except for [chat] and [edit], and with the addition of [chat-faq], these also work in chat.


See also this page from the help centre.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .