November 9, 2011

Ten reminders for coding email templates.

Recently, I forced myself to not defer the duties of coding a new template to our guru, Kurt, but rather put that task on my to-do list and get up to speed on best practices as well. Here’s a reminder list for me when I do my next template, but also for anyone else who is interested:

1. Layout – Use tables for layouts, not divs.

2. Stylesheets – Don’t use stylesheets. Keep your styling inline, most email programs strip out stylesheets.

3. Padding / Margin – Use empty cells and rows for padding rather than “padding” or “margin” css attributes.

4. Text Areas – Don’t use style=”width: ____;” or width=”” on div or paragraph tags. Outlook ignores them. Define width by the size of the cell the content sits in.

5. H_ Tags – Include a <span style=”color: #000000;”> tag around the text of any header tags (h1,h2,h3, etc.). Hotmail ignores your color assignment and sticks in their own weird scheme.

6. Images – Use style=”display: block” in all IMG tags so you don’t get a gap below your images.

7. Background Images – Best bet, don’t use them. They display inconsistently (if at all) in email programs.

8. Borders – Cell borders seem to never be displayed right with tables. If you need a vertical border, try using cols with width=”1″ and a background color instead.

9. Images & Line-Height – Remember your table’s defined line height. If you have a row with a defined height of 12px and a line-height of 16px, that row will be 16px tall. If an image 8px tall sits in that cell, even with no text around it, you’ll have a gap.

10. Test – Code like it’s 1996 and test like mad.

More Thoughts & Such

How do you check prospects’ websites for specific code, technology, and software?
April 30, 2024   Read this post →

How to Subscribe to Blogs / RSS Feeds via Email
February 16, 2024   Read this post →

A Little of Both
January 3, 2024   Read this post →

Put it On Paper
November 3, 2023   Read this post →

An Ode to Awe
October 16, 2023   Read this post →

Change Has to Be Sold
September 27, 2023   Read this post →

Knowing When to Stop
July 21, 2023   Read this post →

The Language of Uncertainty
July 21, 2023   Read this post →

July 7, 2023   Read this post →

Who am I? Who do I want to be?
June 29, 2023   Read this post →

Hi, I'm Gregg.

I'm a SaaS marketer and maker.


Never heard of me? All good, these days I don't chase influence as much as I do balance. By day I run marketing for Inntopia and evenings see me building SendView, but my happy place is playing in the mountains with my family.