Build Email Templates in Tables or DIVs?

Discussion in 'HTML & Website Design' started by drew68, Sep 15, 2015.

  1. #1
    which is better??
     
    drew68, Sep 15, 2015 IP
  2. mmerlinn

    mmerlinn Prominent Member

    Messages:
    3,197
    Likes Received:
    819
    Best Answers:
    7
    Trophy Points:
    320
    #2
    Tables are for displaying tabular data, not for formatting. Use FORMS for an email template.
     
    mmerlinn, Sep 15, 2015 IP
  3. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,279
    Likes Received:
    1,696
    Best Answers:
    31
    Trophy Points:
    475
    #3
    I'd use divs. Make sure you avoid any external / internal css though. Use something like: <p style="font-size: 15px; font-weight: bold; font-family: Verdana; color: #333333">Some text</p> etc. Skip on videos or large graphics too.

    PS Forgot to mention. Avoid using javascript or jquery in your templates. Anything containing javascript is automatically marked as spam by 99% of email providers.
     
    Last edited: Sep 15, 2015
    qwikad.com, Sep 15, 2015 IP
  4. drew68

    drew68 Well-Known Member

    Messages:
    582
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    128
    #4
    thnx guys...was just told that i should use tables. but i'm going to stick with divs. thnx
     
    drew68, Sep 15, 2015 IP
  5. sarahk

    sarahk iTamer Staff

    Messages:
    28,808
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #5
    I'd be one of the people recommending tables
    email programs are blunt instruments and really prefer old school html with inline styles
    Try with divs but test on a variety of email clients
    Consider your target market and think about what they'll be using to read your email... hotmail, gmail or Outlook Express 2000
     
    sarahk, Sep 15, 2015 IP
  6. webcosmo

    webcosmo Notable Member

    Messages:
    5,840
    Likes Received:
    153
    Best Answers:
    2
    Trophy Points:
    255
    #6
    Mix it if you need it, don't force one thing over another where it isn't natural.
     
    webcosmo, Sep 15, 2015 IP
  7. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #7
    Unfortunately, this is where I'd also recommend tables for HTML email (well, I wouldn't recommend HTML-email to begin with, but hey) OR using an image - an image will show up in most clients, and you can provide a simple link to "View this on the web" for those who doesn't show images by default.
     
    PoPSiCLe, Sep 15, 2015 IP
    deathshadow likes this.
  8. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #8
    One BIG thing to remember is that most e-mail clients ignore CSS for anything more than colouration -- AND EVEN THEN cannot be relied upon. You cannot rely on HALF of HTML 4 even working in them, and this includes fairly recent clients like Thunderbird, much less the plethora of older agents people are still using like Eudora and Outlook, much less how webmail nebfers the content.

    Thanks to these limitations common to mail clients, you are basically stuck using HTML 3.2 with only a handful of 4 tranny tags being supported -- and that means dialing the clock back to all the pre-strict formatting habits as you basically have to pretend that the <style> tag doesn't exist, the style="" attribute does not exist... and that means for a complex layout you're GOING to HAVE to use tables. That "<p style="font-size: 15px; font-weight: bold; font-family: Verdana; color: #333333">Some text</p>" @qwikad.com posted? IGNORED in a LOT of still in use mail clients.

    PERSONALLY I think there's no legitimate reason to EVER send E-mail as HTML. MANY mail services are configured to automatically send any mail that's "HTML Only" direct to their trash. IF you go this route, send as multipart so you can have a plaintext equivalent in addition to your goofy HTML version otherwise you're gonna get auto-flagged as SPAM -- a LOT!

    Fancy formatted HTML e-mails are a train wreck that is invariably broken somewhere, and pretty much just screams "look at me, I'm SPAM!!!" -- my advice? Just don't do it! You want some fancy formatted page, make it as a page on a website and just put the URL of that page into a plaintext mail. Anything more complex than that is going to be rejected as SPAM for about a third the people out there, be embarassingly broken for another third, and simply piss off the remainder of folks out there.

    NOT that I'm pulling numbers out my backside on that, that's a guesstimate, but an educated one.
     
    deathshadow, Sep 16, 2015 IP
  9. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,279
    Likes Received:
    1,696
    Best Answers:
    31
    Trophy Points:
    475
    #9
    How do yahoo and gmail do this? You know how they have their own editors and stuff. If you send it from either one of them to the other one using the editors the email gets received in the design and colors you applied to it. If you inspect the elements it will look something like: <b><font color="#FF0000;">Somet text</font></b>. However if you send this code by itself you will not get the results you want. Looks like, somewhere in their inbox page, they use their own .css to make an email appear like it was intended to appear.
     
    qwikad.com, Sep 16, 2015 IP
  10. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #10
    A LOT of webmail clients filter the markup in HTML e-mails and substitute their own. This is done for security reasons in an attempt to block cross-site scripting exploits and other methods of screwing with accounts. They'll filter out scripts and scripting attributes, wholesale replace elements in an attempt to make the mail appear as designed despite not preserving the markup.

    Can drive you NUTS when it does not appear as designed because of their rewrite -- and is the same reason a number of mail clients block HTML e-mails entirely or just show the flat markup escaped instead. (which looks SO great BTW -- not. Normal people seeing markup == confused normal people)

    Interestingly most mails sent to me FROM gmail or Y! go straight to my spam box, gee -- wonder why. Guess that goes hand in hand with why I don't use gmail -- half my legitimate mails go to the spam box, and another quarter bounce without so much as a warning to the sender or recipient. I really don't get how people actually use gmail given what a buggy broken train wreck of slow loading painful scripttardery it is.

    Sadly that describes most webmail at this point. Sad as a decade ago I thought webmail would spell the death of mail clients, now with the scripttardery, painfully slow speed and agonizingly bad ignorance of accessibility they've managed to send me running and screaming back to Thunderbird and/or Opera M2.
     
    deathshadow, Sep 16, 2015 IP
  11. KewL

    KewL Well-Known Member

    Messages:
    245
    Likes Received:
    16
    Best Answers:
    3
    Trophy Points:
    128
    #11
    HTML Emails a pain in the ass. You have to Tables, inline-styles, lots of html styling attributes. 90% of code you'd write on a website wont work in email. Checkout stuff that works here:

    https://www.campaignmonitor.com/css/

    You also have to test your email in 50 different email clients. Get a free trial of http://litmus.com/ or https://www.emailonacid.com/

    Be sure to keep your email with in 100k~ (or somewhere around there). I forget the exact size limit but anymore and your email with have the three dots to show the email in gmail (hidden by default)
     
    Last edited: Sep 17, 2015
    KewL, Sep 17, 2015 IP
    sarahk and deathshadow like this.
  12. ProxyRadar

    ProxyRadar Greenhorn

    Messages:
    22
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    20
    #12
    There will be no difference for your email recepients, make it as more convenient to you
     
    ProxyRadar, Sep 18, 2015 IP
  13. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #13
    Eh, what?
    There will DEFINITELY be a difference for the users - depending on what client they're using.
    As @deathshadow has pointed out in great detail, different clients support different content, but NONE OF THEM support a proper HTML-rendering engine.
     
    PoPSiCLe, Sep 18, 2015 IP
    sarahk likes this.
  14. sarahk

    sarahk iTamer Staff

    Messages:
    28,808
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #14
    It's always good to have a benchmark to gauge the quality of someone's responses.
     
    sarahk, Sep 18, 2015 IP
  15. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #15
    So, you found one that has a starting value of about -100?
     
    PoPSiCLe, Sep 18, 2015 IP
    sarahk likes this.
  16. MarkupBox

    MarkupBox Banned

    Messages:
    7
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    21
    #16
    I don't see any comparison between them while creating email templates. They are specially used for building tables . For email you can use a a form or plain template.
     
    MarkupBox, Sep 21, 2015 IP
  17. sarahk

    sarahk iTamer Staff

    Messages:
    28,808
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #17
    say what?
     
    sarahk, Sep 21, 2015 IP
    deathshadow likes this.
  18. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #18
    I was about to say "Could somebody translate that into ENGLISH for me?" -- seems to be more and more of a problem here, many of the posts of late having worse language than the average "Paypal account status" spam.
     
    deathshadow, Sep 21, 2015 IP