Solved

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

Posted on 2014-02-12
3
623 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can't get container centered 4 24
CSS SASS 4 34
really easy css change help please 4 18
Search Item in Table 2 19
This article discusses how to create an extensible mechanism for linked drop downs.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

839 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