What version of HTML to use in emails?

后端 未结 4 447
孤城傲影
孤城傲影 2021-01-25 04:29

What version of html would yo recommend for mail content to get best mail-client compatibility?

HTML 3.2
HTML 4.01 transitional
HTML 4.01 strict
XHTML 1.0

4条回答
  •  自闭症患者
    2021-01-25 04:39

    If you are coding HTML emails, you want to code them like it is 1999.

    This means using tables for layout, inline styles and limited css.

    Here is a nice graphic showing what works and in what browsers: http://www.campaignmonitor.com/css/

    Some general rules that I follow:

    • padding goes on tags or tags and nothing else
    • use background images sparingly or not at all
    • no divs, instead use tables and nest them appropriately
    • inheritance does not always work, there for an inside of

      tag will not always inherit the styling so it is best to give the tag it's own inline style for everything including font styles

    • set all images to display:block and border="0" and always declare width and height
    • 提交回复
      热议问题