Jeremy
Jeremy

Reputation: 2000

Is there a way to set a font to apply to an entire email?

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

Answers (3)

Bidstrup
Bidstrup

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

Ayush
Ayush

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>​

Demo

This of course won't work if any td specifies its own font-family which will override the inherited value.

Upvotes: 1

neu-rah
neu-rah

Reputation: 1693

in your html/email put some style

<style type="text/css">
    td {font...;}
</style>

or generic using * instead of td

Upvotes: 1

Related Questions