Displaying a Twitter Follow Button with Valid HTML
- 10 October, 2011 -
- Twitter Dev -
- Tags : Social Plugins, T, Twitter
- 3 Comments
Here is some code that allows you to have a HTML Valid Twitter follow button?
Move the code into a document.write JS function and it will all validate.
<script type="text/javascript">
/* <![CDATA[ */
document.write('<a href="https://twitter.com/shanejones" class="twitter-follow-button">Follow @shanejones</a>');
/* ]]> */
</script>
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
Hi, this was just what I was looking for but now getting the validation error end tag for element “A” which is not open ‘); can u please help
Thanks Anton
This helped me finally validate my Twitter and Facebook buttons. Thanks! You can view the source at http://www.detroitfacts.org.
This worked great, thank you for sharing it. Damn validator.