?
Solved

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

Posted on 2014-02-12
3
Medium Priority
?
684 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 1000 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 1000 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

829 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