HTML email: tables or divs?

Is HTML / CSS required to send html email in a tabular format, or can I use a DIV with the same guarantee that it will display a good cross-mail client? I downloaded a few templates to see how they are made, what my own is based on, and they all seem to use tables.

Any insight is greatly appreciated, thanks!

+67
html html-email
May 29 '10 at
source share
4 answers

When it comes to HTML email, note that all of the best web development practices are out of the box. To make your look consistent, you must:

  • Using table layouts
  • Using old school style for tables
  • Use ONLY inline styles and only very simple ones. <style> -tags are discarded by many clients.
  • Skip the use of <html> , <head> and <body> - in any case, they will be discarded by most clients.
  • If you are inserting images, try to make sure that the email looks decent, even if the images are not uploaded. Many customers require the user to mark the message as “safe” before displaying images.

Here you can read more detailed versions of the above points:

+128
May 29 '10 at 14:52
source share

Like everything here, use spreadsheets and embed all of your css ... but there is an ecosystem of email applications to help you create emails.

I have been using Mailrox ( https://www.mailrox.com/ ) for most of my email collections lately, and it seems to be pretty good, and produces perfect HTML emails if you build one from the design, even if he is in beta.

You can also try pre-built templates from Mailchimp or Monitor , but it sounds like you have a design for your email, so Mailrox might be better.

If you really want to do email creation, I would say I forgot most of what you know about modern web designers and master table layouts, and use the links from PatrikAkerstrand.

Litmus is also great for testing your hand-coding designs. They give you a preview of your email (almost) all email clients.

Hope this helps.

+9
Jun 15 '12 at 17:08
source share

Many email clients cannot display css. I would use spreadsheets to format your mail and use images for anything else.

+4
May 29 '10 at 14:44
source share

As already mentioned, your HTML emails should be created using tables (not divs). You can also add CSS - as with an external stylesheet, but this will not be accepted by all email clients, so it is actually more reliable to add your css to the string. Even so, some attributes may be ignored by some email clients, which is why your best bet still uses HTML attributes when available. "You have to do this because some clients, such as Gmail, will ignore or strip the contents of your tag or ignore them." Source: http://webdesign.tutsplus.com/articles/creating-a-simple-responsive-html-email--webdesign-12978

As an aside, I also found out through the trial version and the error that even the images must be cropped to the exact size that you want them to be displayed in your letter. Outlook, if it is terrible at collecting HTML attributes for width / height for images, and I saw some nasty stretched letters, only because these attributes were ignored and the images were displayed in full size.

+1
May 24 '16 at 1:46
source share



All Articles