• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 446
  • Last Modified:

html email

I'm creating an HTML email to send out to clients.  Basic layout no funny animation stuff just text and pics.

2 questions:

a)I read that tables are a better way to do the layout for html mail because email apps etc may not render divs/css properly. Should I use tables (I prefer to use divs)?

b)Can/should I use HTML 5 or 4 and CSS 2.x or 3?

thanks
0
tf2012
Asked:
tf2012
  • 2
  • 2
2 Solutions
 
GaryCommented:
Yes tables are better - div's may work but depends on the client how and if they are rendered.
Any css should be inline - no external style sheets etc.
http://www.catswhocode.com/blog/best-practices-for-coding-html-emails
0
 
grahamnonweilerCommented:
For Email do not use <DIV> and CSS must be in line, do not try to place your CSS in the body header as it will invariably fail to render correctly.

Only tables will render correctly, both in the latest desktop based email progams and free web based email services (Gmail etc.)

Additionally, background images do not generally work, while having your images sourced online and not inline will raise the chance of your mail being identified as SPAM.

Other things to avoid is relying on percentage based widths for positioning, use specific widths and ensure your syntax is correct. It is also worth keeping your CSS styling as simple as possible.

Finally, never use the <tbody> element - this will be an absolute red flag for SPAM filters.

In respect to which version of HTML - avoid anything other than the simplest of HTML formatting (no HTML 5) and make sure you convert all special characters and entities in your text.
0
 
tf2012Author Commented:
grahamnonweiler:

regarding:
"Additionally, background images do not generally work, while having your images sourced online and not inline will raise the chance of your mail being identified as SPAM."

it sounds like using css background-image is a no-no, and sourcing the images from a server is a spam flag.  So how should I include images in the email?  How is this generally accomplished?

thanks
0
 
grahamnonweilerCommented:
Background images do not "generally" work out, background colours can be used.

You can use "server side" images in the text, but you need to check the ratio of text to image.

Meaning, as the ratio of text to image decreases the chances your message will be identified as spam increases.

Most "professional" level anti spam filter techniques now take the actual size on the image in to consideration, so that if you have a message that has for example 5 paragraphs of text (which is quite a lot of text) but you have a server side image that is 500 pixels wide by 960 pixels high, you would still get a high spam probability.

However, if the image was 500px by 300px then the probability decreases!

Sometimes the images are sent as inline attachments, but the increased bandwidth resulting from this does not guarantee your message will get "through". Again the rules regarding the ratio of text to image applies.

What you need to avoid is the tendancy to make the entire message from images (GIF/JPG) which we often see people doing - these type of messages always end up in the junk pile.
0
 
tf2012Author Commented:
great info, thanks
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now