Design, Email marketing, HTML Issue, Live Mail

The Year in Email: A Look Back At 2015

Another year has come and gone, and with it, another bagful of email catastrophes. Some of these are minor issues that could have been caught with a little more testing or another set of eyes, some are truly catastrophic, and a few problems are unique to that bane of email, Microsoft Live Mail.

Bad Links

It’s always a good idea to test your links before sending out an email, but even the best of us miss one from time to time. Here are a few we noticed this year.

You Know What I Mean!

Bad linkIn this newsletter from last January, MediaPost created a link to the AMA conference without the all important “http://” at the beginning. While that works fine when you are entering a URL in the Address Bar, it won’t work in an href command. It doesn’t help that they’ve used base64 encoding on the message which moves us further from the link and is probably why their emails always end up in my Spam folder.

My Name is [Your Name]

link placerI’ve talked about using placer information in previous year-end reviews. Placers are useful, but only if you don’t forget to remove them from the final mailings. In this case, the placer link “http://your.website.address.here/” was used on the image. Fortunately, there were actual links later in the message, which minimized the damage here.

Spot the Panda

wrong linkWhen you have several links in an email, there is always a danger that one won’t get its proper URL. Net-A-Porter does a good job of ensuring that every link goes to the item you click on, saving a lot of useless scrolling and page flipping (See last year’s Year-End Review for examples of this). But with this many unique links and more in every mailing, it was inevitable that they would miss one. In this case, it’s the Stella McCarthy coat on the bottom left, which links instead to Net-A-Porter’s emagazine.

Three Out of Nine is Not Good Odds

66% failure rateGetting one link wrong is forgivable. Getting six out of nine wrong is not. This email from Fab takes you to the same page no matter which of these images you click. The problem here is that six of the images are not even on the page. If you want to find them, you’ll have to search for them (they are on the site). Rule #1: Always make it easy for your customers to purchase things. Either create a landing page specifically for the items you’re showing, or link to each of them individually.

Psst! Wanna See a Picture?

no linkThis class sounds interesting, but if you click on the image it will take you to…the image. That’s right. It opens the image location. It doesn’t even take you to Sur La Table’s home page. You can eventually get there by clicking various other links on the page, but it seems like an image that says “Reserve Your Spot” should at least enable you to do just that.

Bad Formatting

Some mistakes are the result of formatting errors. One missing greater-than sign or comment tag and your entire design goes off the rails. Here are a few coding mistakes that we saw this year.

Dear First Name

misspelled dynamic tagno first namebad footer tagThis one is so common that we’re guaranteed to receive a few of these every year. Usually it is the first name that’s missing, but, as you can see from the third example, it can happen elsewhere in an email. I suspect that most of the time this comes about when someone is using a previous mailing to create a new one, and doesn’t pay attention to the merge fields and dynamic content. This is mostly just laziness. I know that Goolara Symphonie will maintain my merge data when I copy in this fashion, but I always replace it just to be on the safe side. Judging from these examples, I suspect that other ESPs are less forgiving.

MS Word + HTML = Disaster

bad codingMost people know better than to try and use Word for their HTML generator. Every once in a while, however, we get an email with the tell-tale “o:p” tag that Microsoft uses to allow you to convert the HTML back into a Word document. This email probably looked just fine in Microsoft Word, and it even looks okay in some visual editors, but it’s a disaster waiting to happen. Ironically, this particular mailing is all text and would have been easier to create directly in any ESP’s visual editor than in Word. This one will always fail in Live Mail (see section below) and often fails elsewhere as well. Here are a couple more examples:

bad codebad codeThese people would have all been better off typing their content in a plain text editor.

Bad Code Practices

Some problems are not the result of typos or inadequate testing. Some are simply bad practices. These aren’t mistakes in the strictest sense, but that doesn’t mean you shouldn’t watch out for them.

No Alts

Ever since Gmail started caching the images, we’ve seen an increase in the number of mailings that omit the alt tags. Here’s a perfect example of this from Warby Parker:

no alt informationThe only text in this mailing is the company’s address and a few links at the bottom. Now here’s one from Bed, Bath and Beyond where they’ve gone the extra mile to make sure that even with the images off, you know what their email is all about and have some impetus to click through:

good alt tags

Ya’ Got No Style!

no style on alt tagno alt tag on blueProviding alt tags is a good practice, but if you’re using them in cells with dark backgrounds, remember to add style color information to the cell, in particular a color property such as #FFFFFF (white) and “text-decoration:none” to make sure the alt tag is readable. In the top example from the Westfield shopping center, the type is barely legible, but even that is only because it includes a link, which turns the type blue by default. The second example from TradePub.com, also includes a link, but the blue background makes it nearly impossible to read. For more information on how to create styled alt tags, see our white paper, Using Text & Images.

Formatting is for Sissies

no formattingI’ve removed the name and address information from the address above because it belongs to the competition. This email came without any formatting. No active links, no nothing. It was clearly a mistake, but there was no follow up apology; just a second mailing with completely different content twenty minutes later. Perhaps they are following that new “never say you’re sorry” attitude that is making the rounds on the Internet, or maybe they hoped no one would notice. Of course, one could point out that this email is, in fact, a violation of the CAN-SPAM act (inactive unsub link), but it’s probably moot.

Don’t Forget to Block

gaps in imageA perennial problem with sliced images in email is the problem of gaps. This is an easy one to prevent. The addition of “display: block” to each of the <img> tags will go a long ways toward preventing this situation. Also watch out for things like padding and margin, which can also wreck a sliced image.

Live Mail Strikes Again

Every email reader has its own idiosyncrasies, but the one that seems to break email the most often is Live Mail. Here are some common problems—and one not so common problem—to look out for in Live Mail.

Watch Out for Links

blue lines around iamgesThe problem we see most often is the blue borders on images with links. Most of the time, it’s merely distracting, but in some cases, such as in the example above, it actually screws up the design. With other mail readers, putting an attribute such as “border: 0” (or “none”) in the <td> tag will eliminate the problem, and many of these mailings contain that instruction, but Live Mail requires this property to be put inside the <img> tag. Put it anywhere else, and Live Mail ignores it.

Black is the New White

3 digit hex code problemAs discussed in last year’s email review, Live Mail does not like three-digit hex codes. You’ve assigned a background of #FFF (white)? Live Mail will treat it the same as #000 (black). Even if you have no customers using Live Mail, it’s a good idea to get into the practice of typing out the full six-digit hex codes.

Paragraph Alignment

centered textThis mailing from Duct Tape Marketing looks fine everywhere else, but open it in Live Mail and suddenly all the text is centered, including a list that appears later on the page. While this isn’t a complete catastrophe, it does make the text harder to read, which is never good. In this case, the problem comes back to the placing the style information between <style> tags instead of inline.

Email from a Mime

santa letter in Live MailThis is particularly weird phenomenon that only seems to happen in Live Mail. I received the email above shortly before Christmas. A big red block. That’s it. No text, no alt tags, and no “Show Images” link to indicate that anything was missing. Not surprisingly, it is an unsolicited email. It comes from a company that offers Santa letters for children. The email does have images (see below), but you couldn’t tell it from what I received in Live Mail. As far as Live Mail was concerned, this mailing was nothing more than a big red block. Here’s how it should have looked:

santa letter with imagesIn a way, it’s probably just as well that nothing showed up. There are typos in nearly every line, they obviously didn’t bother with a test mailing, which would have showed that they used too many snowflakes (it only looks correct in Dreamweaver), and that kid is pretty obviously a stock image. This one would have ended up in this year-end review even if the images did show up.

Cascading Image Sizing

One of the weirdest anomalies We’ve encountered with Live Mail is the following one from Lionsbridge:

smaller and smaller imagesAs a point of reference, here is the same thing sent to a Gmail address:

correctly formattedQuite a difference! After a bit of testing, we found that simply removing the doctype information at the top of the email’s code fixed the problem. This isn’t the first time we’ve encountered that particular issue. Our more recent tests with Live Mail show that this particular problem has been fixed. Nonetheless, as a rule, if you’re copying your code from an HTML editor, it’s a good idea to exclude the <doctype> and <html> tags from the process. The email software is going to wrap your information in those tags anyway. This doesn’t always mess things up, HTML is remarkably forgiving, but better safe than sorry. The truth is, the safest procedure for maximum compatibility is to omit everything except content between the body tags and to put inline any styles you have included, with the exceptions of the media queries and the usual boilerplate styles used to improve compatibility with various mailboxes.

Marketing Missteps

This next section is about mailings that use questionable marketing techniques to achieve their goals. Some could argue that these are effective because they get you to pay attention, but so will a car accident; that doesn’t make it a good thing.

It’s Our Special Interface!

weird unsubCAN-SPAM requires that every promotional mailing includes an unsubscribe link that works, but there is nothing in the law that dictates exactly how you convey this message. This one’s from a questionable company, and would almost certainly have ended up in the spam folder had it been sent to my Gmail account, but my Live Mail account is set to accept a wider range of email. I don’t know about you, but I’d find it preferable to click “This is Spam” rather than click on that suspiciously worded unsubscribe. My advice: Stick to the tried-and-true “Click here to unsubscribe.” The unsubscribe link is no place to get clever.

About Your Account…

paypal announcementOne of the most common techniques used by phishers is the one where they send you a notice about the way they are changing their charges on your bank account. The idea is for you to say, “Oh no!” and click the link, which takes you to a fake, but believable login page where you enter your bank login information. So it’s never a good idea when a legitimate company sends out an email that sets off the same alarm bells. Since I’ve never used PayPal with this account, the fact they sent this email to me means one of two things. Either they think I did give them a PayPal account (I did not), or they didn’t bother to segment the mailing. Both are bad, but the latter is unforgivable.

@SneakyMarketer is now following you!

fake twitter messageMarketers are always looking for new ways to get you to look at their mailings. Sometimes they cross the line. PRWeek’s take off on Twitter’s following notices might have been okay had it been more obviously fake, and had had some truth to it. In fact, it’s just a come on to sign up for their webinar on social media.

Remember Me? No?

An insidious trend in spamming that showed up in my Inbox this year is the fake follow up. Here’s an example:

fake follow-upLooks legit, but a quick look at my Inbox, spam, and trash folder shows that no such original email was ever sent. This is not the first of these I’ve received, but it’s the first time that they went to the trouble of making it look like something was already sent.

Hello, It’s Me Again

Lately there’s been a lot of press about the advantages of sending more email instead of less. The folks at HubSpot must have taken this to heart, because this is what I found in my email inbox one morning:

too many mailingsNow I’m all for frequent mailings, but this is going a bit far. All kidding aside, I realize that this is more likely the result of their site’s automation, but it probably didn’t help things that most of these were sent during hours when many U.S. companies aren’t sending (I am surprised, however, that I didn’t get something between the eight o’clock and nine o’clock mailings).

Until Next Year

That’s all for this year. I normally like end with a few examples of good and/or clever mailing ideas, but this post is already pushing the limits of acceptable length for an online article. I’d like to thank Justin Khoo at FreshInbox for his help in diagnosing some of Live Mail’s idiosyncrasies. Keep emailing, and if there’s one takeaway from this article it’s this: Always test before sending.

Deliverability, Design, Email marketing, HTML Issue

Using Fonts in Email

Fonts in EmailA well-designed typeface is a thing of beauty. It can convey emotion, improve sales, and help define a corporate identity. For years, designers have been trying to figure how to use their favorite fonts in email, sometimes these attempts fail miserably, and other times they lead to other problems that you wouldn’t expect. Using fonts in email takes you into treacherous territory. Is it better to use inline font-family styles or convert everything to images? And what about web fonts? Can you use them in email marketing?

In this overview, we look at all the methods for using fonts in email that are available to marketers and designers. Some of these techniques qualify as best practices, while others should be avoided at all costs. A couple might even qualify as worst practices.

Before we get too deep into the subject, we’d like to point out that we’ll be using font and typeface interchangeably. In the past, “font” referred a specific size of a typeface, so Helvetica 12pt was one font and Helvetica 24pt was another. With the advent of digital publishing, these designations lost their meaning.

Types of Fonts

Fonts come in six basic types:

Types of fonts

Serif

serif fontsSerifs are those little feet that protrude from the edges of a character. Examples of this style of typeface include Century Schoolbook, Garamond, and Palatino. The most famous serif typeface is Times New Roman, which was created for the London Times by Stanley Morison. Serif typefaces are still the preferred choice for blocks of printed text. On the computer screen, they are little harder to read due to the effects of screen resolution of the serifs.

Sans Serif

Sans SerifIf a typeface does not have those little feet, it is referred to as “sans serif.” Examples of sans serif typefaces include Franklin Gothic, Gill Sans, and Univers. The most well-known sans serif font is Helvetica, which is even the star of its own movie. The most common variation on Helvetica is Arial, which was specifically designed to match the font metrics of Helvetica. This was Microsoft’s way of getting around the license fees for Helvetica. San serif typefaces are preferred over serif typefaces for text on the computer screen. Some fonts, such as Verdana, were specifically designed for better readability on computer monitors.

Handwriting

HandwritingA Handwriting font, as the name suggests, is one that resembles handwritten text. These fonts are also referred to as “Cursive” or “Script” fonts. Sometimes these are fancy, such as Park Avenue and Edwardian Script, and sometimes they are more casual, such as Comic Sans and Freestyle Script. Caution should be used with these fonts. As you’ll see when we get to the Web Fonts, cursive fonts usually default to Comic Sans, which is often a poor substitution.

Decorative

DecorativeDecorative fonts are the ones that favor novelty over readability. They come in both serif and sans serif variations, and are usually restricted to logos and headlines. As a rule, they should never be used for blocks of text. Popular decorative fonts include Ad Lib, Jim Crow, Mesquite, Stencil, and Old English. They are sometimes used for logos, but, even here, are best used sparingly if at all. Because of the high level of variations between them, they should never be used in email.

Monospaced

MonospacedMonospaced fonts are the ones that assign the same amount of space for each character. In a monospaced font, the ‘m’ takes the same amount of space as an ‘i’. This type of font is often used to display code, or to mimic an old typewriter. The most popular example of this is Courier. Monospaced fonts come in both serif versions, such as Courier, and sans serif versions, such as Consolas.

Dingbats

DingbatsDingbats are not fonts in the usual sense of the word, but, instead, have replaced the standard alphanumeric characters with little pictographs. In Webdings, for instance, a capital J renders a picture of an island with a palm tree, while in Wingdings it renders a smiley face. Dingbat fonts should never be used in email. You may like the idea of creating rebuses using Webdings, and it may look right on your PC; but if someone opens it on a Mac or some other system that doesn’t come with Webdings, they’ll only see gibberish.

Several pictographs are built into other typefaces as part of the Unicode (UTF-8). These are safer to use and sometimes are even used in subject lines (with ✈ and ❤ being particular favorites). Just make sure that you’ve encoded your mailing as UTF-8 and not 7-bit ASCII. Otherwise, you may end up with little squares or questions marks where the pictographs should be. It’s also important to remember that although there is some overlap in appearance between dingbat font characters and the pictographs that are available as part of the standard Unicode font set, they are not interchangeable. For example, the picture of the airplane in the middle on the left in the picture above is a capital Q in Wingdings. This one will not work in email. You need to use the airplane character as it is indicated in Unicode (you can find a handy chart of the Unicode dingbats and other special characters here).

Using a font directly

You can assign any typeface you want to your email content. Here, is an example of an inline style assigned to display in Helvetica:

<p style=”font-family: Helvetica;”>Hello World</p>

Of course, this doesn’t mean that your recipients are going to see the same thing on their computers that you see on yours. If the recipient does not have Helvetica installed in their system, they are going to see another font. As a rule, this will be Arial, but don’t count of the substitution to be automatic. By only listing one typeface in font-family style, you leave it up to the ISP, email client, or particular software to choose the alternative. This could end up being anything from Myriad Pro to Courier.

For this reason, it is always a good idea to provide a list of acceptable alternatives to the font-family style, starting with the preferred font, with the rest of the fonts following in order of preference:

<p style=”font-family: Helvetica, Arial, Verdana, ‘Helvetica Neue’, sans-serif;”>Hello World</p>

We’ve ended the list with the generic “sans-serif” as a safety measure to ensure that if none of the fonts listed are available, the text will still appear as a sans-serif font.

But what if your type absolutely has to be in a specific typeface? If it is part of your logo or associated with a specific branding campaign, you might not want the type replaced with anything else. In that case, your best bet is to convert the type to an image, but be careful—this is an overused technique that comes with some definite downsides.

Using Images for Type

At first, it seems like converting all your text to an image seems like a way to go. If you wanted to use Ad Lib for your headlines with Broadway for your text, an image would make sure that this (admittedly terrible) combination would look the same to everybody, regardless of their operating system, email client, or computer. But before you go converting all your mailings to images, there are a few important caveats to take into account.

No Text, No Inbox

First and foremost, you shouldn’t do it because it can affect deliverability. Shady email senders sometimes try and outsmart the spam filters by converting their text to an image in an attempt to elude the spam filters that check for certain words. As a consequence, many ISPs deduct points from a reputation score when they find only images in a message. This can be just enough of a negative to redirect your mailing from the Inbox to the Spam folder.

Not Text, No See

The second downside to using only images is that not all mailbox providers display images as a default. The Mail app on the iPhone does and Gmail does, but most others still default to image display off. If all your text has been converted into an image, you run the risk of missing potential sales for no better reason than that the recipient never saw your actual message.

Remember the Alt Tag

If you do plan to use an image to display text, the safest thing to do is to include the text in the image as an alt tag. That way if the recipient has image display turned off, he can still get an idea of what the picture contains. In the case of logos, you can also add styles to the alt tag to improve the email’s appearance. For more on this subject, see our white paper, Using Text and Images.

What About Web Fonts?

From time to time, people ask about using Google Web Fonts in email. If you are new to Google Web Fonts, these are fonts that you can use without having to have them installed either on your computer, or the computers of your recipients. There are other sources for web fonts, such as Adobe and Font Squirrel, but these usually require scripts, which do not work in email. Web fonts require you to add two pieces of information to your mailings—a <link> tag with the URL for the font you want to use, and a font-family style attribute.

Web Fonts will only work when the email client recognizes the <link> tag and can use it to download remote content (in this case, the fonts). Here’s an example of an email that was set using two Google Web Fonts—Luckiest Guy for the headline and Josefin Slab for the text. In this first example we’ve taken the HTML code provided by Google and stuck it in the mailing without further modification. Here is how the HTML it appears in a browser (in this case, Chrome) before it is sent as an email:

Google Web FontsNow here’s the same email as it appears in various email clients and platforms:

web font chart using defaultsAs you can see, only the iPhone and Thunderbird rendered it correctly. Even here the fonts are only displayed when “Load Remote Images” is turned on (the default setting for the iPhone, but not for Thunderbird). Because Web Fonts require a link to work, these fonts are treated the same as images. If an email client defaults to “Images Off,” it’s not going to display Web Fonts either, even if it can. No images, no fonts.

The fact that cursive is listed as the font category for Luckiest Guy doesn’t help. It means that on PCs the headline defaults to various weights of Comic Sans, a font so detested that Weird Al Yankovic uses it as a gag in his song, “Tacky”. On Macs and iPhones, cursive defaults to Snell Roundhand which is better than Comic Sans, but is still a far cry the intended result. In the case of Live Mail, the fact that “serif” was listed as the fallback didn’t seem to matter. It still converted the text to Arial.

Of course, there’s nothing that says you have to use the HTML exactly as Google provides it. In the case of the Luckiest Guy font (and, I suspect, many others), you’d be better off ignoring their recommended category and choose one of your own. You’ll also want to add a few logical alternatives to the list. Here are the inline style settings for the headline after we’ve modified it:

style=”font-family: ‘Luckiest Guy’, Impact, Haettenschweiler, ‘Franklin Gothic Bold’, ‘Arial Black’, sans-serif; font-size: 3em; color: #63499B”

There’s really nothing like Luckiest Guy that is common on computers, so I’ve chosen an assortment of bold display faces that you’ll find on many devices and platforms. Likewise, Josefin Slab is a hard one to match since slab-serifs (i.e., serifs that are squared off instead of pointed) are not that popular either. Here are the inline style settings for the body copy:

style=”font-family: ‘Josefin Slab’, Memphis, Lubalin, Rockwell, Clarendon, Georgia, serif; font-size: 1em;”

Rockwell and Clarendon are popular fonts, and although Georgia is not a slab-serif font, it is a common font and shares many characteristics with Clarendon. Here are the results:

Web Font chart with better style choicesAs you can see, the results are still far from perfect, but they are better. If this level of discrepancy between fonts is acceptable to you, then you might find web fonts worth experimenting with. If your audience is made up primarily of iPhone and Mac users, it might be worthwhile. If your audience is primarily on PCs and Android phones, then it probably isn’t worth the effort.

Text Still Wins

When all is said and done, the advice we gave in Using Text to Deliver Your Message still stands: You’ll get the best results if you remain flexible on the font choices. Converting text to images where the font is important (such as logos and other branding) is acceptable, but even then, limit it as much as possible and make sure you’ve provided alt tags that are either informative or will make people want to display the images.

Design, HTML Issue

Making Links Look Good

broken linksIf the email that lands in our inboxes every day is any indication, people don’t spend enough time thinking about the effects that links have on images and text. Blue linked text on dark backgrounds, problematic borders, and unwanted underlines can all interfere with an email’s design. These are very easy fixes that should be in every email designer’s toolbox, so it’s a little puzzling why so many mailings don’t follow these simple rules.

Links on Images

In a previous article on this blog, we discussed ways to make sure your images link correctly in email. Image maps and image slicing offer ways to let portions of an image link to different pages, but that’s only part of the story. There is one more hidden pitfall in image handling that often goes overlooked. In fact, hardly a day goes by when I don’t see this particular mistake pop up in some email or another. You may think you’ve covered all your bases when it comes to linking images, but if you’re not careful, there’s one more trap waiting to trip you up.

To understand better take a look at this example:

bad borderAs you can see, the last two sections of the image have links. The email viewing software saw the links and placed highlights around these sections. In this particular case, the link borders also throw off the text in the image, making it harder to read, although the text at the top and the bottom could have been—and should have been—actual text (see Using Text to Deliver Your Message), the blue line certainly makes matters worse.

The blue line doesn’t appear in all email viewers, which is why this is sometimes overlooked. If the email reader you normally use doesn’t do this, you might miss it. Unfortunately, the problem crops up most often in Microsoft email clients and mailboxes, which aren’t exactly low profile products. Sometimes it can interfere with the design in other ways. Here’s a button with rounded corners and a blue border that completely destroys the intended effect:

button with borderIn this particular case, rather than create the button using the border-radius style in a colored table cell, they generated it as an image instead, so the email reader put a border on it to indicate it has a link.

The fix for this is easy, and should come almost as second nature to email designers. Let’s look at the image tag on the button:

<img src="RegButton.jpg" alt="Register Today!" />

Now here’s what’s missing in red:

<img src="RegButton.jpg" alt="Register Today!" border="0" />

It’s that simple. The addition of the border attribute is all it takes to eliminate this particular problem so why do so many emails still show up with blue borders? In all likelihood it’s because the sender is only checking against their default email client.

Lost in the Blue

With text, links default to blue underlined text in email. In one sense, this is usually a good thing. It wouldn’t serve much purpose to leave the text black with no underline. On the other hand, there are times when the blue color and the underscore can interfere with the design. Here’s an example of the button shown above recreated (as near I could) as a table cell instead of an image:

cell based buttonBorders aren’t an issue because it is no longer an image. The styles on the table cell are entered as inline styles, giving it specific text attributes and removing the underline that indicates it is a link. But here’s that same table cell, with the inline styles removed, allowing the text to revert to its default choices:

cell based button no changesNot very useful. You can remove the underline by adding the style attribute “text-decoration: none,” but the text would still be blue. Just be careful that you haven’t assigned the text to appear in a color that is close to the default link color (which varies between browsers), email client systems aren’t smart enough to recognize the color of your text, and your links are likely to get lost.

Arranging Attributes

Browsers can be very forgiving when it comes to the order of attributes in your HTML. Email clients are not so generous. For this reason, you’ll sometimes encounter cases where a mailing looks just fine as a stand-alone web page, but then falls apart when it reaches the inbox. When this happens, you should check the order of your tags. Make sure things like your <td> tags are closed within their appropriate <tr> tags, and the <tr> tags are closed within their <table> tags.

One area you should be especially careful is with the <a> tags. We’ve seen occasions where attempts to insert other tags inside of the <a> tags—such as <span> and <p> tags—have resulted in broken links. It’s far safer to make <a> tags the innermost tag set, and wrap the other tags around it, with the exception of the <img> tag, which is self-contained (i.e., requires no closing tag). Also keep in mind that the <a> tag wants to add certain style attributes to your text. To override these attributes, you need to change the style attributes of the <a> tag, not the text. Adding a span won’t always work. To illustrate, here is a screenshot of the same tag rendered three different ways:

link orderThe middle line is the only one that is correct here. All three lines were given the same style attributes (style=”font-weight: bold; color: #ee5500; text-decoration: none;”). The top example had the style attributes inserted into <span> tags that were placed inside the <a> tags; in the middle example, the styles were added directly to the <a> tag; and in the bottom example, the styles were inserted into <span> tags that start before the <a> tags and end after them. As you can see, all three lines had different results. In some email clients, the top two were correct, but none of them rendered the third line correctly. Adding “!important” to the styles had no effect. Clearly the best way to control the attributes of text in an <a> tag is by assigning the styles within that tag. Any other method can yield unpredictable results.

Live Spelled Backwards is Evil

The email client that is the worst offender when it comes to creating this sort of havoc is, not surprisingly, Live Mail. The examples shown above come from this particular email client, and were, in some cases, okay in other email clients. As we discussed in our 2014 Year End Review, Live Mail brings its own set of idiosyncrasies to the table. Here’s an example of how a set of social buttons at the bottom of the page in an L.A. Times newsletter appeared in Live Mail:

bad callsAnd here is how it appeared in other email clients:

everywhere elseThose of you that have read the 2014 Year in Review article might guess that the black background is the result of using the three digit color code “#fff” instead of “#ffffff.” But the example above has nothing on this one from Lionbridge:

cascade effectIn this case, the buttons are overlapping each other, with each button appearing slightly smaller than the one to its right. Now here’s what this table looks like in every other email client:

okay versionQuite a difference! So what caused this strange cascading effect? We narrowed it down to the <doctype> tag:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Normally, the <doctype> tag has no effect on an email. Ironically, even this one wouldn’t have been a problem if the designer had left off the URL at the end. Then it would have worked just fine. Like the browsers, Live Mail has its own methods for dealing with the differences between HTML versions, and without the link, the software figures it out correctly. Of course, there’s really no reason to ever place a <doctype> tag in an email. We recommend leaving them out. For that matter, the safest approach is to place only the styles you want for responsive purposes (which normally appear between the <head> tags), and the actual content (which falls between the <body> tags). Everything else serves no purpose in an email, and may actually create problems.

A Few Basic Rules

Getting links in email to appear the way you want them to is not difficult. It boils down to a few simple rules:

  • Always include border=0 in your <img> tags
  • Use text-decoration: none to eliminate the underline on links
  • Assign a contrasting color on text links if the main content is blue
  • Place the style attributes for linked text in the <a> tags
  • Eliminate superfluous code and tags, such as JavaScript and <doctype>

These fixes are so easy to implement, it’s puzzling why many emails are still sent with these problems. In the grand scheme, these are relatively minor issues, but, as we have shown, little things can make a big difference.