⚠️ Update 2021-06-10: This is a very old answer. I’m not sure how accurate it is 10 years after it was written. Mail clients are hopefully more compliant today ⚠️
When it comes to email HTML, note that all best practices from web development goes out the window. To make the look consistent, you should:
- Use table based layouts
- Use the old-school attribute styling for tables
- Use ONLY inline-styles, and only very simple such.
<style>
-tags are discarded by many clients. - Skip using
<html>
,<head>
and<body>
– They will be discarded by most clients anyway. - If you embed images, try to make sure that the e-mail looks decent even if images are not loaded. Many clients require the user to mark the email as “safe” before displaying images.
You can read more detailed versions of the above points here: