esedic
9/29/2015 - 3:54 PM

Best practices for styling HTML emails

Best practices for styling HTML emails

1. Inline styles are you best friend. Absolutely don't link style sheets and do not use a <style> tag (GMail, for example, strips that tag and all it's contents).

2. Against your better judgement, use and abuse tables.  <div>s just won't cut it (especially in Outlook).

3. Don't use background images, they're spotty and will annoy you.

4. Remember that some email clients will automatically transform typed out hyperlinks into links (if you don't anchor <a> them yourself). This can sometimes achieve negative effects (say if you're putting a style on each of the hyperlinks to appear a different color).

5. Be careful hyperlinking an actual link with something different. For example, don't type out http://www.google.com and then link it to https://gmail.com/. Some clients will flag the message as Spam or Junk.

6. Save your images in as few colors as possible to save on size.

7. If possible, embed your images in your email. The email won't have to reach out to an external web server to download them and they won't appear as attachments to the email.

8. And lastly, test, test, test! Each email client does things way differently than a browser would do.