SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast vertlime's Avatar
    Join Date
    Nov 2004
    Location
    UK, Canada
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    When designing an HTML email

    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?

    Thanks!

  2. #2
    SitePoint Member
    Join Date
    Feb 2013
    Location
    Southern California
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  3. #3
    SitePoint Enthusiast vertlime's Avatar
    Join Date
    Nov 2004
    Location
    UK, Canada
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TheRealSJK View Post
    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.

    Anyone?
    Innovative Graphic Design Solutions
    www.magentismedia.com



  4. #4
    SitePoint Addict
    Join Date
    Nov 2012
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

    Antony

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,103
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    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! )
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  6. #6
    SitePoint Member
    Join Date
    Feb 2013
    Location
    Southern California
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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/


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •