Post History
As long as the intervening text doesn't confuse any reference to the second element, you're okay. I wouldn't put the two items too far apart, but your first example is still perfectly clear.
Answer
#4: Attribution notice removed
Source: https://writers.stackexchange.com/a/14798 License name: CC BY-SA 3.0 License URL: https://creativecommons.org/licenses/by-sa/3.0/
#3: Attribution notice added
Source: https://writers.stackexchange.com/a/14798 License name: CC BY-SA 3.0 License URL: https://creativecommons.org/licenses/by-sa/3.0/