问题
I use two email programs, gmail and entourage (by Microsoft). I was wondering how do i create an email that will look like webpage. Apple sends me these all the time, but i have no idea how to re-create them. Could anyone help?
回答1:
Basically there are a few differences between HTML displayed inside email client programs (including web-based ones like Gmail) and regular email clients that you need to take into consideration while designing your HTML email.
- CSS/Styles - A lot of email clients do not support
<style>...</style>
tags (including GMail). Therefore your styles will have to be inline -<p style="color:red">
- Use tables instead of divs for layout - Yes unfortunately divs aren't supported on a lot of clients, therefore tables are the most reliable way of creating complex newsletter type HTML email formats.
Some links -
- http://www.htmlgoodies.com/beyond/css/article.php/3679231/How-to-Create-Great-HTML-Emails-with-CSS.htm
- http://mailformat.dan.info/headers/mime.html info on MIME and HTML
- http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23683 - Not sure if this will help for entourage but microsoft's tool to validate html/css for outlook. At least give you an idea of what one email client will and wont allow.
HTH
来源:https://stackoverflow.com/questions/7372719/how-do-i-create-an-html-formatted-email