Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Design HTML Email Design Designing Email with CSS Applying CSS to the Content Blocks

lihaoquan
lihaoquan
12,045 Points

Why are HTML emails so limited?

Why are HTML emails rendered differently in each email client? Is there a reason why email clients don't unify their way of rendering HTML emails? I also don't understand why email clients strip off head tag and body tag from the HTML email, is there a reason or benefit in doing so? Also, are HTML emails undeveloped? Why can't we use CSS3?

1 Answer

Chris Shaw
Chris Shaw
26,676 Points

Hi Li Hao Quan,

Why are HTML emails rendered differently in each email client?

Because there isn't a standard that exists that tells vendors how emails should behave on the end users screen, unlike HTML which is controlled by the W3C; emails were kind of a happy accident in the history of technology. The biggest problem was nobody seemed happy being in charge of creating such a standard, 20 years later nothing and not much has changed.

One of the major issues is unlike Gmail, Outlook, Yahoo and AOL for example clients such as Outlook use Microsoft Word as the rendering engine for emails which uses sub-standard HTML conventions creating an almost emulated type of browser environment that really doesn't work for advanced email designs.

Is there a reason why email clients don't unify their way of rendering HTML emails?

  • Many different vendors
  • Too late for a unified change, it would take a miracle to see a change like this
  • The drive to be the best, basically Google, Microsoft and Apple want to lead the charge and watch everyone fall behind.

I also don't understand why email clients strip off head tag and body tag from the HTML email, is there a reason or benefit in doing so?

Only certain clients do this, it's to prevent script injection which stops viruses and trojans from being downloaded when the email is opened in the clients software/website of choice, it's also a way for vendors to inject their own crap into the email before it gets rendered.

Also, are HTML emails undeveloped? Why can't we use CSS3?

If there was a standard we might have seen a change years ago, sadly without one only the vendors themselves can provides technologies such as CSS3 which browser based clients and some mobile clients accept but it still has a VERY long way to go.

Hopefully one day we see all clients with support for new technologies but at this point we still have to design for the '90s and add colour later on.

lihaoquan
lihaoquan
12,045 Points

Thank you very much for replying and clearing my doubts!