Browse by...
Home Resources Blog

If you’re used to coding your email newsletters for Gmail, you’re probably an expert on inline CSS by now. As our recent CSS research highlighted, Gmail doesn’t support the <style> or <link> element. This means if you want your links to be in a size 11 font and a light blue color, you’ll need to code something like…

<a href="https://www.campaignmonitor.com" style="font-size:11px;color:#4fb5e9;">Visit the web site</a> to find out more

OK, kind of annoying but it works. But what about our automatically generated links for unsubscribing, linking to a web-based version and adding a forward to a friend link. As you know, these are generated after you import your design from the tags present in your HTML, such as <unsubscribe> and <webversion> and up until now you couldn’t add your own inline CSS to them. Well, not until today anyway.

Introducing the style=”” attribute

By adding a style="" attribute to the unsubscribe, webversion and forward a friend tags, we’ll automatically add that inline CSS to the personalized links we create for each recipient.

Using our example above, let’s say we want to make our unsubscribe link at the bottom of the email blue and in size 11 font.

<unsubscribe style="font-size:11px;color:#4fb5e9;">Unsubscribe</unsubscribe> from our monthly newsletter list

We’d get <a href="http://www.unsubscribeaddress.com" style="font-size:11px; color:#4fb5e9;">Unsubscribe</a> from our monthly newsletter list

You can use exactly the same technique for the web version and forward to a friend tags too, such as <forwardtoafriend style=""></forwardtoafriend> and <webversion style=""></webversion>.

This blog provides general information and discussion about email marketing and related subjects. The content provided in this blog ("Content”), should not be construed as and is not intended to constitute financial, legal or tax advice. You should seek the advice of professionals prior to acting upon any information contained in the Content. All Content is provided strictly “as is” and we make no warranty or representation of any kind regarding the Content.
Straight to your inbox

Get the best email and digital marketing content delivered.

Join 250,000 in-the-know marketers and get the latest marketing tips, tactics, and news right in your inbox.

Subscribe

Get started with Campaign Monitor today.

With our powerful yet easy-to-use tools, it's never been easier to make an impact with email marketing.

Try it for free