HN2new | past | comments | ask | show | jobs | submitlogin

Why is it better to use inline CSS here? Isn't inline CSS usually frowned-upon?


Email clients strip external css and often the style tag. Therefore you have to use inline css to style html emails.


> Isn't inline CSS usually frowned-upon?

Yes, but not in the 1990s, which is the era HTML email finds itself stuck in.


Most browser-based email clients (Gmail, Yahoo, etc.) strip out the head and body tags from HTML emails. You never really know what's going to be removed, so the safest thing is to inline all of your styles.


Yes. But generally when things are frowned-upon, it's because they have something going for them. (If everyone agrees that something is dumb, there's no point in belaboring it.) Inlining is the simplest and most fool-proof way to apply CSS, which helps explain why it works in email where all else fails.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: