It depends on what referencing method you use. There are standard ways of referencing a website. In the social sciences, the Harvard method is used frequently. I know that scientific papers may well use a different method to Harvard, but I will show you the Harvard reference below out of interest (the part that goes in the bibliography).
Dalgas, G. 2011. What is a good standard for publishing a reference to a stackexchange thread? answer. Available: http://meta.math.stackexchange.com/q/1876/151595
[2015, 26 October].
In the body of the text, I think a number such as $^1$ or [1] is common for the citation in scientific texts. In a social science text this would be cited in the body as (Dalgas, 2011). I have referenced Geoff's answer because I think it is rare that you will reference a question. Disclaimer: there are many different versions of Harvard and no universal one. I have put "answer" in lower-case because I usullay put subtitles in a lower-case, and only the first letter of the title in upper-case. The URL had to be escaped because with no back-ticks it was automatically converted into a hyperlink, but it is usually in plain text. Today's date at the end of the URL indicates the date that the website was accessed on (websites can move).