Is there a definitive source of all possible markup for all the SO sites? For instance, I saw on one meta site someone putting tag links in their question, and it showed up looking like the actual tag image. Is that a markup device? Also, I've heard some discussion on another meta site about creating a 'Spoiler' markup device, that would hide spoiler text until the reader hovered their mouse over it. Is there a place to see a list and usage information for specialized, SO-only markup syntax?
There is currently no definitive resource - more because there have actually been a few recent additions to the system in the past month or so. For the most part, everything is detailed in the Formatting Help, which is linked in various places. When asking questions, you can see it in a link on the right while you write. When answering questions, it's found by clicking the large question mark in the top right, as shown below.
That link pretty much explains how to do most of what you can format on the Stack Exchange Network. However, the two you're noting are brand new functions that have only recently been added. The closest to a timeline of this is our community-maintained changelog, which does include when these two were added. But it's not organized to help you find anything markup related.
It might be wise to get the Formatting Help updated for these two. Or, failing that, find a good tag to categorize these unique markup features for easier-to-find action - they can be found under markdown, but that's also grouping it with every other basic request or support question on markdown.
This answer aims to collect advanced markdown features that are not listed in the inline post help (click that
? at the top right of the text box) nor in the markdown advanced editing help. If you notice a feature that's neither in the official editing help nor in this answer, please add it here.
To read a spoiler, move your mouse over it or select it.
>! To read a spoiler, move your mouse over it or select it.
There are no footnotes. Move along.¹
¹ <sub> or fake them. </sub>
Backticks in code spans
If you need to typeset a backtick in a code span, surround your code span by multiple backticks. See the markdown documentation for more information. This is a code span containing a lone backtick:
This is a code span containing a lone backtick: `` ` ``.
Syntax highlighting (coloring)
Stack Exchange uses Google Code Prettify for automatic syntax highlighting.
- The language is chosen automatically based on the site and the question tags.
- You can override the default choice with the HTML comment
<!--language: lang-foo-->before a code block.
- Or use
<pre class="lang-foo prettyprint-override">
- You can use a Stack Exchange tag after
language:, instead of the Prettify language code (
- Note that the
languagecomment must be immediately before the code block and must not be indented.
<!--language-all: foo-->to affect the highlighting of all subsequent code blocks.
- Or use
<pre>instead of a four-space indent to avoid syntax highlighting on a block.
- Only sites that often use code blocks have syntax highlighting.
(let ((greeting "hello world")) (print greeting))
This is part of supported HTML markup:
Sites that need mathematical typesetting allow
Citing Stack Exchange tags
This is Stack Overflow's [tag:markup] tag.
That is Meta Stack Overflow's [meta-tag:markup] tag.
Note that the features listed here can be used in questions, answers and tag wikis, but not in comments. Comments use a very restricted markdown subset with a few incompatibilities: HTML tags don't work; hyperlinks must use the
[text](URL) syntax; code spans (between
`backticks`) are parsed differently.
In addition, some sequences of the form
[word] are converted to hyperlinks, for example
[faq] links to the site's FAQ (e.g. https://meta.stackoverflow.com/faq), etc. See Add data.SE style “magic links” to comments for the full list.
If you want to experiment, use the formatting sandbox.
Since the Great Editing Help Revamp of May 2011, https://stackoverflow.com/editing-help is the place you're looking for. It has been much improved, contains everything1 from the list here, and it is supposed to always be up-to-date. If you find anything that's missing, please open a question here on Meta so we can add it.
For advanced Markdown features (we obviously can't put everything in there), it also links to John Gruber's syntax Markdown documentation, which obviously is the definitive resource for all things Markdown.
1Except for footnotes, because they don't exist. Also, things like syntax highlighting or LaTeX are only mentioned on sites where the respective feature is enabled.