Reputation: 2000
I've been trying to apply a font to an entire email (which is composed of a table).
Putting the font-family in the 'style' of the <body> tag doesn't work, nor does putting it in the <table> or <tbody> tags, nor does putting a <font> tag around the table work.
What is the best way to do this? Do I need a font-family inline style in each <td>, or a <font> tag around all of the content? Is there really no way to declare the font at an e-mail wide level?
Upvotes: 3
Views: 9644
Reputation: 1617
You need to define your font in each <td>
. Many email clients will automaticly reset the font within a <td>
.
So something like <td style='font-family: Arial'>
.
You can also do it in the header, but some clients will ignore this (looking at you outlook 2013-2016) Body{ font-family: Arial !important }
Upvotes: 11
Reputation: 42450
You should be able to apply the font-family
to the table element, and all td
elements will inherit that property, like this:
<table style="font-family: Courier">
<tr><td>Foo</td></tr>
<tr><td>Bar</td></tr>
</table>
This of course won't work if any td
specifies its own font-family
which will override the inherited value.
Upvotes: 1
Reputation: 1693
in your html/email put some style
<style type="text/css">
td {font...;}
</style>
or generic using * instead of td
Upvotes: 1