HTML & CSS
I know I should use tables. When using CSS, should I place my code within the head tags or inline with my HTML within the body tags?
This is a very old post but just in case you still are looking for the answer, you should not use tables unless you have numerical tabular data for any html project. Instead you should use CSS for all of your formatting needs.
For an html email, I think it's best to use tables for formatting the layout.
I agree, even if there are only two or three TDs or TRs in the table.
At least then you have some control of how the e mail will look when received
Still I'm no expert.
Yes, to be sure your email will work across a reasonable range of email clients, you do need tables, unfortunately. It's amazing that this area is lagging so far behind web standards, but with companies like Microsoft basing Outlook around the Word rendering engine, there isn't much hope for things improving for a long time yet.
The safest way to add CSS to an HTML email is to place the styles inline—again, a real pain. Some email clients still strip out any styles contained in the <head> section, so it's not as reliable.
The ideal would be to code emails with web standards only. If we all did that, companies that provide crap email clients would go out of business, because people would stop using them. In reality, though, this never happens. (And it would basically mean everyne would have to use Mac Mail! :lol: )
Yes, I see the points for using tables. I have a Mac and always push for current standards. You might be interested in this article on this exact subject: http://www.sitepoint.com/code-html-email-newsletters/
This topic is now closed. New replies are no longer allowed.