Solved

HTML / HTML5 / CSS / Non-Browser apps like Thunderbird.

Posted on 2014-02-12
3
619 Views
Last Modified: 2014-02-13
I have an app that send emails.  The body of the email can be defined as HTML.   I want to use the bgcolor attribute of <body> to set the background color of the email.  Simple enough.   http://www.w3schools.com/tags/att_body_bgcolor.asp

However, "The bgcolor attribute of <body> is deprecated in HTML 4.01."  and "The <body> bgcolor attribute is not supported in HTML5. Use CSS instead."

So, I'm using Thunderbird as my email client, which is not a browser of course.  If I use the bgcolor attribute, Thunderbird recognizes it and all is well.  

So, how do HTML / HTML5 / CSS and  non-browser apps like Thunderbird work together / or not work together?   If I use the bgcolor attribute to set the background color of the email, do I run the risk of it not working at some point in the future?  If yes, would that imply that Thunderbird no longer supported HTML 4, but instead switched to HTML5?

Thanks for any feedback.
0
Comment
Question by:HLRosenberger
3 Comments
 
LVL 8

Assisted Solution

by:Adrian Crabtree
Adrian Crabtree earned 250 total points
ID: 39854284
Hi HLRosenberger,

A great guide to creating HTML emails can be found here: http://www.campaignmonitor.com/guides/coding/guidelines/.

What you can do is you inline styles to create your backgrounds, colors, etc. Here's an example:

<body style="background: #333">

Open in new window


Note that creating an email for every email client will be tricky if not impossible, but the link I gave you should give you a good understanding on how to go about it the best way. More guides from Campaign Monitor can be found here: http://www.campaignmonitor.com/guides/
0
 
LVL 2

Accepted Solution

by:
DualCool earned 250 total points
ID: 39854300
use inline css
 more email clients will except the inline css rather the deprecated html bgcolor
<body style="background-color:#060;">
</body>

or you can use both
the email clients that don't support one or the other will error silently
<body bgcolor="#E6E6FA" style="background-color:#060;">
<body >
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 39857068
That's the ticket.  Inline CSS. Thanks!
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question