Some things to know and do for designing HTML emails
iPhone default fonts - Helvetica (3S), Helvetica Neue (4)
Android default fonts - Droid, Roboto
iPhone min-font-size = 13px
Gmail does not recognize any CSS in <head>, so use inline styles. This includes all of your media queries. (edit - gmail on a mobile device still renders as if it's a browser, so media queries can stay in the <head>)
drink heavily
Outlook 2007, 2010, 2011, and 2013 use Word to render HTML. quit now.
drink heavily
Outlook 2007, 2010, 2011, and 2013 don't accept CSS definitions for height, so you'll have to use attribute height
Outlook 2007, 2010, 2011, and 2013 don't accept padding for <p> or <div>
Outlook 2007, 2010, 2011, and 2013 don't recognize max-width or min-width
Outlook 2007, 2010, 2011, and 2013 don't like % widths
drink heavily
You can't use floats for images, use align attribute
You can't use list-style-image, list-style-position, list-style-type
You have to use redundant <span> tags inside links and headers so that your colors are consistent and links don't get underlined (unless you want them underlined)
drink heavily
In <body> define -webkit-text-size-adjust: none; so that your fonts stay the size you set them
for responsive image sizing, set max-width: 100%; height: auto; width: auto \9; and define the size in the container object
if you're resizing images in IE, for all <img> -ms-interpolation-mode: bicubic;
whitespace between table rows in your HTML renders in some clients/browsers
Get a $10/month Mail Chimp account to use the Inbox Inspector to see how your mail will look in most browser/client combinations, on mobile devices, and in standalone clients
Basically, use '90s HTML - design for IE6 and keep it simple. I've actually found it not too painful as long as I made the limitations clear to the customer. I mean, they're not going to have rollovers and pop-out menus and stuff like that in an HTML email anyways.
Fortunately coding up a script to convert my CSS into inline styles was less painful than I expected.
Seconded. My boss at the old job bought a list and I told him it wouldn't go well. They put it into mailchimp, and after several e-mails with support later they canceled his account. They don't fuck around with fake lists.
Add to that, Yahoo does some strange line spacing.
This is an excellent list, and for the drinking, these mail clients seem to trust your markup more if you do some really crazy stuff, so it's probably a good idea.
I've been working on redesigning emails for my job, so I needed to put together this sort of list from the dozens of websites which talk about email design (especially responsive/mobile ready email). About 2 months into the project I've got a set of 4 similarly designed emails and still haven't quite knocked out all the bugs.
We don't have a significant part of our mailings going to Lotus Note users, so I really didn't think it worth while. Start with Campaign Monitor's CSS limitations and best of luck to you.
The reason is because there are so many different email readers out there (Hotmail,Exchange,Yahoo,Whatever Apple uses, Juno, etc...), in addition to the different screens that look at the email, it's difficult to build a catch-all to these. MailChimp's templates have done this, and they work wonders.
The article kind of glosses over it, but generally it's best to code columns using tables. Although emails are generally moving to a single column layout for mobile compatibility, there are cases where you'll still need to use columns, and floating your divs simply doesn't work on a lot of email platforms. Also for mobile users, it's best to make any buttons / banners in the email larger so they're easier to click on a touch screen. If you want to get more advanced, then this article about using @media queries for mobile is useful.
There are also a lot of stupid quirks you're going to have to account for, like giving all the images "display:block", making sure all table rows are "valign:top", and individually declaring all of the pixel widths for padding / margins (i.e. don't do "padding: 0 10px" but "padding-top:0; padding-right:10px; padding-bottom:0; padding-left:10px;"), making sure all individual table cells have the fonts and text alignment declared in css (some platforms default to align center, some default to aligning left).
Generally, writing html for emails is a HUGE pain in the ass. There are a lot of things that are BAD and INEFFICIENT coding but you have to do them in order to ensure compatibility on ALL of the platforms. You can try to do fancier stuff in CSS, but you have to make sure it degrades gracefully on older platforms. The worst platform that's in wide use is MS Outlook, since it started using MS Word as the html engine in 2007.
Edit: another one--Paragraph tags have inconsistent behaviour on different platforms. Some platforms translate <p> to mean a "div" with an extra space on the bottom. Some don't have the space. I tend to avoid them. If you have to use a <p> tag, make sure you explicitly declare the padding and margins in the CSS. The one I HATE the most is the lack of support for "white-space:nowrap" in Outlook 2003. Especially when you have to put in shit like a phone number or price that the client feels should always be on the same line for legal reasons but it's only breaking on some emails due to a variable product name. And you can't use a non-breaking space because it's breaking the phone number at the dash... FFFFFFUUUUUUUUUUUUUUUUUUUU
This article is more about the layout it seems, Campaign Monitor's resource is the best guide I've found for what you can and can't do with HTML emails.
I'd also point out that HTML emails can be very inaccessible for people with disabilities who use adaptive technology. Navigating tables within tables is a huge pain for screenreaders.
I would like people to send plain text emails as well or at least generate HTML emails that are humanly readable. TABLEs and complex DIV-structures might help to have your emails look good in a web browser or HTML enabled email client, but it makes the code also unreadable for those who don't use an HTML enabled email client.
Usually one can set HTML vs text in a sending company's profile for you. And if they don't have a profile for you... who cares? <Cyberman voice> DELETE! </Cyberman voice>
A lot of organisations just send HTML emails, like receipts, invoices, notifications and status updates, order info, insurance info, and so on. For those organisations where I do have an on-line presence of some kind I've looked for settings like plain text only, but these are exceptions, not the rule.
Because I work in email marketing and knows that it's best practice to include a plain text version of the email with the HTML one.
If you've got a gmail account, you can click "show original" in the more section to view the full message and headers, there you'll usually see the two different content types.
So what? You used the adverb "always" (=100%, no exceptions). I got plenty of HTML emails which were not accompanied by a plain text version. Therefore your statement is wrong.
GOG did this until recently for example. Now they include a dummy text/plain version which looks like this:
If you can see this text it means that your email client couldn't display our newsletter properly. Please visit this link to view the newsletter on our website: [redacted]
As in emails with a mime type text and mime type HTML? Just fine. It displays the plain text email and shows the HTML as an attachment (which can be rendered using w3m).
After struggling with responsive design (lack of) support on Android, BlackBerry and even iOS (two separate iPhones with same major OS rendering the emails differently!!) I arrived to 600px-wide templates with larger fonts for the responsive version.
HTML email design is truly an exhaustive endeavor, especially if hoping to get acceptable rendering on older clients like blackberry, outlook in locked corporate environments etc.
Also, I recommend Litmus testing. Expensive but was worth it during the development period.
I think we should all warn people for the moment arises when web clients butcher your html and send it back ass backwards. I've actually been given shit for this.
I am currently working on some propaganda for my photography and would like to know what would be the best way to layout a HTML email? Tables? Any suggestions are welcomed.
Yeah, coding for email is just mundane for me at this point. It doesn't help that business for whom I primarily build is very template-oriented, so there's no real challenge in rendering anymore... Oh well, holiday season, maybe it'll be fun. They're doing animated gifs. ...yay.
I'm sure you know already, but for others, make sure the first frame of the gif displays your main CTA as animations don't work in Outlook.
I've just started a new job, which means I'll at least get the joy of starting the entire email marketing program for some big companies from scratch. Damned sight more interesting than reworking the same templates month in, month out.
This! Whenever another designer comes to me asking why their email is broken I point them there and campaign monitor first. Figure it out for yourselves bitches!
136
u/spkr4thedead51 Nov 05 '12 edited Nov 05 '12
Some things to know and do for designing HTML emails
This includes all of your media queries.(edit - gmail on a mobile device still renders as if it's a browser, so media queries can stay in the <head>)10
u/ispeakcode Nov 05 '12
The easiest/best solution is to utilize MailChimp's html email templates: http://mailchimp.com/resources/html-email-templates/
The reason is because there are so many different email readers out there (Hotmail,Exchange,Yahoo,Whatever Apple uses, Juno, etc...), in addition to the different screens that look at the email, it's difficult to build a catch-all to these. MailChimp's templates have done this, and they work wonders.
16
u/stanthemanchan Nov 05 '12 edited Nov 05 '12
The article kind of glosses over it, but generally it's best to code columns using tables. Although emails are generally moving to a single column layout for mobile compatibility, there are cases where you'll still need to use columns, and floating your divs simply doesn't work on a lot of email platforms. Also for mobile users, it's best to make any buttons / banners in the email larger so they're easier to click on a touch screen. If you want to get more advanced, then this article about using @media queries for mobile is useful.
There are also a lot of stupid quirks you're going to have to account for, like giving all the images "display:block", making sure all table rows are "valign:top", and individually declaring all of the pixel widths for padding / margins (i.e. don't do "padding: 0 10px" but "padding-top:0; padding-right:10px; padding-bottom:0; padding-left:10px;"), making sure all individual table cells have the fonts and text alignment declared in css (some platforms default to align center, some default to aligning left).
Generally, writing html for emails is a HUGE pain in the ass. There are a lot of things that are BAD and INEFFICIENT coding but you have to do them in order to ensure compatibility on ALL of the platforms. You can try to do fancier stuff in CSS, but you have to make sure it degrades gracefully on older platforms. The worst platform that's in wide use is MS Outlook, since it started using MS Word as the html engine in 2007.
Edit: another one--Paragraph tags have inconsistent behaviour on different platforms. Some platforms translate <p> to mean a "div" with an extra space on the bottom. Some don't have the space. I tend to avoid them. If you have to use a <p> tag, make sure you explicitly declare the padding and margins in the CSS. The one I HATE the most is the lack of support for "white-space:nowrap" in Outlook 2003. Especially when you have to put in shit like a phone number or price that the client feels should always be on the same line for legal reasons but it's only breaking on some emails due to a variable product name. And you can't use a non-breaking space because it's breaking the phone number at the dash... FFFFFFUUUUUUUUUUUUUUUUUUUU
16
u/Buy-theticket Nov 05 '12
This article is more about the layout it seems, Campaign Monitor's resource is the best guide I've found for what you can and can't do with HTML emails.
5
u/jpb0104 Nov 05 '12
Another good place to start: https://github.com/mailchimp/Email-Blueprints
3
u/d36williams Nov 05 '12
Outlook 2010 uses Microsoft word to render HTML. Fml every time I deal with it
3
u/Purp Nov 05 '12
24 ways: Rock Solid HTML Emails
3
u/[deleted] Nov 05 '12
The trick is, be a beginner at html. Tables, inline styles, and forget about any decent css.
4
u/50missioncap Nov 05 '12
I'd also point out that HTML emails can be very inaccessible for people with disabilities who use adaptive technology. Navigating tables within tables is a huge pain for screenreaders.
5
u/[deleted] Nov 05 '12
I would like people to send plain text emails as well or at least generate HTML emails that are humanly readable. TABLEs and complex DIV-structures might help to have your emails look good in a web browser or HTML enabled email client, but it makes the code also unreadable for those who don't use an HTML enabled email client.
sincerely,
a mutt user
2
u/andymatic Nov 05 '12
Needs to include the step: 'Refill Xanax prescription.'
2
u/themanwhowas Nov 05 '12
As a professional email and web designer, I can confirm everything in this thread.
/sob
2
u/obviousoctopus Nov 05 '12
It would be amazing if there was something like http://caniuse.com/ for HTML emails. The closest I've found is http://www.campaignmonitor.com/css/ (go for the downloadable version) but it's a little too old.
After struggling with responsive design (lack of) support on Android, BlackBerry and even iOS (two separate iPhones with same major OS rendering the emails differently!!) I arrived to 600px-wide templates with larger fonts for the responsive version.
HTML email design is truly an exhaustive endeavor, especially if hoping to get acceptable rendering on older clients like blackberry, outlook in locked corporate environments etc.
Also, I recommend Litmus testing. Expensive but was worth it during the development period.
2
u/ngmcs8203 Nov 05 '12
Don't do any CSS online. Keep it in your <head> and let premailer do its magic to move it inline.
1
u/[deleted] Nov 05 '12
I think we should all warn people for the moment arises when web clients butcher your html and send it back ass backwards. I've actually been given shit for this.
1
u/DoctorWheeze Nov 05 '12
This CSS support guide is my #1 resource for HTML emails.
1
u/foetusofexcellence Nov 05 '12
Some more fun things to know.
You can't have black texts in gmail, it'll overwrite the styling. You have to make them dark grey, like #000001.
Put your anchor text in a span so Yahoo Mail doesn't add it's own yshortcuts styling to them.
1
u/cosmozoan Nov 06 '12
What is wrong with plaintext emails, I for one never see html in my inbox.
1
u/ButterInYrCoffee Nov 06 '12
There's some very good resources here. Resources I will need to use (drinks heavily).
1
u/Papshmire Nov 06 '12
Buy an extremely old version of Dreamweaver...that's what we use.
1
u/workroom Nov 06 '12
great post. thanks!
1
u/heavylenses Jan 15 '13
I am currently working on some propaganda for my photography and would like to know what would be the best way to layout a HTML email? Tables? Any suggestions are welcomed.
-1
u/[deleted] Nov 05 '12
Or, avoid all the headaches and use a damn image like I do. Usually it's all one big image, with maybe 1 or 2 anchors to link to stuff if I need to.
0
u/mtx Nov 05 '12
I use this tool: https://www.mailrox.com/
Outputs compatible html emails for pretty much everything.
-17
u/[deleted] Nov 05 '12
Html is for webpages, not for email. Only douchbags put html in emails.
-1
u/[deleted] Nov 05 '12
make one big picture and stick inside an email...lol
0
u/[deleted] Nov 05 '12
[deleted] — view deleted comment
0
u/[deleted] Nov 05 '12
[deleted] — view deleted comment