Compatibilité des propriétés CSS dans les emails
Date de publication : 3/01/2008
Par Adrien Pellegrini
Cet article montre la compatibilité des propriétés CSS dans les emails au format HTML
visualisés dans certains clients mails et webmails. Le résultat est assez surprenant.
1. Introduction
2. Les propriétés CSS et les webmails
3. Les propriétés CSS et les clients mails sur Windows
3. Les propriétés CSS et les clients mails sur Linux
5. Notes supplémentaires
6. Conclusion
7. Remerciements
1. Introduction
Le support de CSS dans les emails est assez catastrophique. Selon l'interface que vous utilisez pour
lire vos emails (par interface j'entends client mails ou webmails), le résultat de l'email peut être tout
à fait autre. De plus, comme vous pourrez le constater dans cet article, les points communs entre les diversers
interfaces se font assez rares. Il est donc difficile d'envoyer un email correctement formaté avec du CSS.
Pour chaque interfaces, une liste assez complète de propriétés CSS à été testée. Vous trouverez également,
en fin de tableau, une note qui correspond au nombre de "ticks" correspondant à l'interface.
Les tests ont été réalisés sur les clients mails et les webmails suivants :
Les différents clients mail et webmails ont été choisit par l'équipe de rédaction. Ils n'ont
pas été choisit au hasard, mais tout simplement du top10 figurant sur quelques sites.
Veillez nous excuser si votre webmail ou client mail préféré ne figure pas dans la liste de
test.
2. Les propriétés CSS et les webmails
| |
Gmail |
Windows Live |
Yahoo! |
AOL |
Inbox |
BlueBottle |
BigString |
MyWay |
LaPoste |
| style (head) |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| style (body) |
 |
 |
 |
 |
 |
 |
 |
 |
 |
|
|
|
|
|
|
|
|
|
|
| link (head) |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| link (body) |
 |
 |
 |
 |
 |
 |
 |
 |
 |
|
|
|
|
|
|
|
|
|
|
| form |
 |
 |
 |
 |
 |
 |
 |
 |
 |
|
|
|
|
|
|
|
|
|
|
| * |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element element |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element > element |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element + element |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| .element |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| #element |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element[attribut] |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:link |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:visited |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:hover |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:active |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:first-child |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:focus |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:first-line |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:first-letter |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:before |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:after |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| |
Gmail |
Windows Live |
Yahoo! |
AOL |
Inbox |
BlueBottle |
BigString |
MyWay |
LaPoste |
| background-attachment |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| background-color |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| background-image |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| background-repeat |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| background-position |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| border |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| float |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| clear |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| clip |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| color |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| display |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| font-family |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| font-size |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| font-style |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| font-variant |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| font-weight |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| height |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| letter-spacing |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| line-height |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| list-style-type |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| list-style-image |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| list-style-position |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| margin |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| |
Gmail |
Windows Live |
Yahoo! |
AOL |
Inbox |
BlueBottle |
BigString |
MyWay |
LaPoste |
| max-height |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| max-width |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| min-height |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| min-width |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| outline |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| overflow |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| padding |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| position |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| text-align |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| text-decoration |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| text-indent |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| text-transform |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| vertical-align |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| visibility |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| white-space |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| word-spacing |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| z-index |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| caption-side |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| empty-cells |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| border-collapse |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| border-spacing |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| |
Gmail |
Windows Live |
Yahoo! |
AOL |
Inbox |
BlueBottle |
BigString |
MyWay |
LaPoste |
| Note (/66) |
31 |
41 |
56 |
61 |
63 |
1 |
63 |
48 |
58 |
3. Les propriétés CSS et les clients mail sur Windows
| |
Thunderbird |
Outlook 2007 |
Windows Live |
Dream Mail |
Foxmail |
Opera |
Incredi mail |
Poco Mail |
TheBat |
| style (head) |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| style (body) |
 |
 |
 |
 |
 |
 |
 |
 |
 |
|
|
|
|
|
|
|
|
|
|
| link (head) |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| link (body) |
 |
 |
 |
 |
 |
 |
 |
 |
 |
|
|
|
|
|
|
|
|
|
|
| form |
 |
 |
 |
 |
 |
 |
 |
 |
 |
|
|
|
|
|
|
|
|
|
|
| * |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element element |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element > element |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element + element |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| .element |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| #element |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element[attribut] |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:link |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:visited |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:hover |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:active |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:first-child |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:focus |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:first-line |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:first-letter |
 |
 |
 |
|
 |
 |
 |
 |
 |
| element:before |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| element:after |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| |
Thunderbird |
Outlook 2007 |
Windows Live |
Dream Mail |
Foxmail |
Opera |
Incredi mail |
Poco Mail |
TheBat |
| background-attachment |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| background-color |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| background-image |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| background-repeat |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| background-position |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| border |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| float |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| clear |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| clip |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| color |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| display |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| font-family |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| font-size |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| font-style |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| font-variant |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| font-weight |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| height |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| letter-spacing |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| line-height |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| list-style-type |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| list-style-image |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| list-style-position |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| margin |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| |
Thunderbird |
Outlook 2007 |
Windows Live |
Dream Mail |
Foxmail |
Opera |
Incredi mail |
Poco Mail |
TheBat |
| max-height |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| max-width |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| min-height |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| min-width |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| outline |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| overflow |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| padding |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| position |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| text-align |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| text-decoration |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| text-indent |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| text-transform |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| vertical-align |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| visibility |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| white-space |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| word-spacing |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| z-index |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| caption-side |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| empty-cells |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| border-collapse |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| border-spacing |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| |
Thunderbird |
Outlook 2007 |
Windows Live |
Dream Mail |
Foxmail |
Opera |
Incredi mail |
Poco Mail |
TheBat |
| Note (/66) |
63 |
27 |
54 |
50 |
45 |
56 |
47 |
36 |
20 |
4. Les propriétés CSS et les clients mail sur Linux et Mac OS X
| |
IceDove |
Kmail |
Mac OS X Mail |
| style (head) |
 |
 |
 |
| style (body) |
 |
 |
 |
|
|
|
|
| link (head) |
 |
 |
 |
| link (body) |
 |
 |
 |
|
|
|
|
| form |
 |
 |
 |
|
|
|
|
| * |
 |
 |
 |
| element |
 |
 |
 |
| element element |
 |
 |
 |
| element > element |
 |
 |
 |
| element + element |
 |
 |
 |
| .element |
 |
 |
 |
| #element |
 |
 |
 |
| element[attribut] |
 |
 |
 |
| element:link |
 |
 |
 |
| element:visited |
 |
 |
 |
| element:hover |
 |
 |
 |
| element:active |
 |
 |
 |
| element:first-child |
 |
 |
 |
| element:focus |
 |
 |
 |
| element:first-line |
 |
 |
 |
| element:first-letter |
 |
 |
 |
| element:before |
 |
 |
 |
| element:after |
 |
 |
 |
| |
IceDove |
Kmail |
Mac OS X Mail |
| background-attachment |
 |
 |
 |
| background-color |
 |
 |
 |
| background-image |
 |
 |
 |
| background-repeat |
 |
 |
 |
| background-position |
 |
 |
 |
| border |
 |
 |
 |
| float |
 |
 |
 |
| clear |
 |
 |
 |
| clip |
 |
 |
 |
| color |
 |
 |
 |
| display |
 |
 |
 |
| font-family |
 |
 |
 |
| font-size |
 |
 |
 |
| font-style |
 |
 |
 |
| font-variant |
 |
 |
 |
| font-weight |
 |
 |
 |
| height |
 |
 |
 |
| letter-spacing |
 |
 |
 |
| line-height |
 |
 |
 |
| list-style-type |
 |
 |
 |
| list-style-image |
 |
 |
 |
| list-style-position |
 |
 |
 |
| margin |
 |
 |
 |
| |
IceDove |
Kmail |
Mac OS X Mail |
| max-height |
 |
 |
 |
| max-width |
 |
 |
 |
| min-height |
 |
 |
 |
| min-width |
 |
 |
 |
| outline |
 |
 |
 |
| overflow |
 |
 |
 |
| padding |
 |
 |
 |
| position |
 |
 |
 |
| text-align |
 |
 |
 |
| text-decoration |
 |
 |
 |
| text-indent |
 |
 |
 |
| text-transform |
 |
 |
 |
| vertical-align |
 |
 |
 |
| visibility |
 |
 |
 |
| white-space |
 |
 |
 |
| word-spacing |
 |
 |
 |
| z-index |
 |
 |
 |
| caption-side |
 |
 |
 |
| empty-cells |
 |
 |
 |
| border-collapse |
 |
 |
 |
| border-spacing |
 |
 |
 |
| |
IceDove |
Kmail |
Mac OS X Mail |
| Note (/66) |
63 |
57 |
62 |
5. Notes supplémentaires
Gmail :
text-indent: XX% ne marche pas.
Microsoft Oulook 2007 :
capitalize et lower-case ne marche pas.
DreamMail, FoxMail, Incredimail, Kmail :
blink ne marche pas.
PocoMail :
element[attribut="xxx"] ne marche pas, cela aura le même effet que element.
blink et overline ne marche pas.
The Bat! :
La balise caption est supprimée.
blink et overline ne marche pas.
6. Conclusion
Pour avoir la meilleure compatibilité possible de vos emails au format HTML, vous devez utiliser
le style CSS dit "en ligne".
Il y a tellement de divergences entre les différents clients mails et les différents
webmails que ça devient vite difficile de s'y retrouver. La seule solution
est de tester, tester et tester vos emails.
7. Remerciements