[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2014-02-12
3
Medium Priority
?
673 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
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 …

656 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