Why does any social site like Reddit use this method?
javascript
Solution
To isolate the button's markup and style from the web site's own CSS rules.
Problem
See what Reddit uses to add one of its buttons: ``` <script type="text/javascript" src="http://www.reddit.com/button.js?t=2"></script> ``` This JavaScript adds an `<iframe>` to the page, then the `<iframe>` adds the HTML code. Why doesn’t the JavaScript add the HTML directly?