HTML & CSS
I have a client who would like an email news letter coded up. I am a skilled developer, but the newsletters is not something ive done before.
After a quick look around the web, and some examples sent to me by various IT companys am I right in thinking Tables (urgh) with inline style are most widley used technique?
If so what would be the most appropriate DTD to use if any?
most if not all email clients do not support css and so inline styles is the only way to go afaik.
but even style support can vary widely between email clients. stick to plain basic standard styles. don't use styles like postion. specify absolute and not relative paths to images.
if you're using php mail() to send the emails this tutorial is a good demo on sending html emails
Thanks Kalon - and great link. Yes im using PHP mail to send so thats a helpful link. I will stick to basic table and styles, as it looks like many are using.
unfortunately with coding up html emails you have to think retro.....way retro in your coding technique
and I forgot to mention, with html emails this is the one situation where I would say it is ok and much safer to use tables for layout.
I must admit, im finding it hard to think Retro, so im going to copy some examples to get used to tables :x
I agree with Kalon. But, you can still try to keep your tables as clean, logical and accessible as possible, and consider having a link near the top users can click to read the newsletter in their browser in regular HTML and CSS.
This site has studied various email clients and have many templates you can try out for free for newsletters: http://www.campaignmonitor.com/
They posted research on the Resources page.
Thanks for the added input. I can tell you, im thrown by this table lark. We skimmed over the subject in unviersity as W3C complient XHTML & CSS was thrown at us left right and centre.
Im not sure if i even have skills to do a complex table layout :injured:
Avoid a complex table layout. Otherwise you'll just run into all the problems you get when the tables stop being simple. Simple tables, for example, are easier to make accessible and keep a logical order.
HTML emails have constraints on them even if the client does understand CSS. People have clients who load all mails at once. Nobody wants to wait for some bazillion-kb download. They need to be fairly short or mostly text, low on the number of images, and not complex! It's a newsletter, not a magazine issue! Lots of mail clients block images, so you'll want to check your results with images off... a simple layout helps make the lack of images still make sense.
Good advice, oh and I like the avatar
Yeah, we do our best to keep it out of the forums but occasionally one slips through the net. If you see any spam (or any other kind of inappropriate post), there's a couple of things you can do to help. The first one is to click the red flag icon on that message to alert the admins, who can then delete it. The second is not to quote their message and URL, giving them more publicity!
I would advise the client NOT to do HTML e-mails for the simple reason many servers (like mine) are set up to auto-block them as spam; since no legitimate e-mail I would ever expect from someone has the need to have HTML in it. It's a great way to filter out the SPAM.
As to doctype? NONE. Why NONE? Because as mentioned external stylesheets don't work with them and inlined CSS generally doesn't work right either; The most recent HTML specification that e-mail clients even support is HTML 3.2 -- at which point you don't need the doctype.
Which IMHO is just another reason NOT to do HTML e-mails in the first place.
Which again is so meaninglessly vague after that recent 'change' that it's probably used less than it was before the change.
"Flag" -- what the devil does that even MEAN? JHVH you use wording like "report to moderator"... at LEAST as the title attribute. The nonsense about "report" or "warning" having a negative connotation is almost as silly as the high school I went to two decades ago; They handed out "E"'s because "F" had the negative connotation of Failure -- which is why the key on the report card read "E - Failure"...
Basically anyone who never saw the thread about the change is going to have no clue what that even IS! I bet johnuk was looking for the report button and couldn't even find it!
[OT]I bet johnuk was looking for the report button and couldn't even find it!
At least one more member now knows. :)[/OT]
I don't have any issues with sending html emails.
But since some users switch it off, even if their email client supports it, it's probably a good idea to send
1) both a plain text and html version of the content in the email. This tutorial shows how. Doing that allows the email client to decide which version they will display.
2) a link in both versions to a web page version of the email content
There are good reasons for sending HTML newsletters - it allows you to communicate more effectively and produce a more attractive and professional looking missive. But if you do send HTML mailings, you should give people the option to choose between plain text and HTML when they sign up, so that people who either prefer plain text or whose mail clients only support plain text don't have to download the full HTML.
I use mutt as my email client, so I always see the markup of HTML emails. As a result, I never read them.