Add Me!Close Menu Navigation

I build things, hack code and have been colouring in between the lines since 1982. I work as Head of Social Tech at mycleveragency, an awesome Social Media Agency.

Add Me!Open Categories Menu

Displaying a Twitter Follow Button with Valid HTML

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>
Posted By Shane Jones

Shane Jones has been working in the on-line space since 2005 in various roles. From Web Development to SEO and Social Media; Shane now finds himself back in Web Development as the Head of Social Tech at mycleveragency in Manchester. The views expressed in Shane's posts are his own and are not necessarily the views of his employer.

3 Responses to “Displaying a Twitter Follow Button with Valid HTML”

  1. anton says:

    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

  2. Lars says:

    This helped me finally validate my Twitter and Facebook buttons. Thanks! You can view the source at http://www.detroitfacts.org.

  3. Peter says:

    This worked great, thank you for sharing it. Damn validator.

Leave a Reply




Post Categories