Community Forum

Over the years we have built up a community of email marketers, coders and designers that live and breathe email.

Use the Email on Acid Forum like your virtual water cooler: Stop by to discuss email code, quirky clients and fixes and post your issues (with an example of the code) for our community to offer its assistance.

 
   
Gmail is changing my h1, h2 tags to another font

ajcoder

Newbie
Total Posts:  13
Posted: 24 January 2012 04:30 PM

I have specified my font in css.

#idname_here {
        
font-familyTimes "Times New Roman"Timesserif;
    
font-size:18px;
    
font-weight:bold;
    
color:#d2a548;

When I open it in Outlook or Yahoo, it looks fine and appears to be Times New Roman. When I open it in Gmail, it looks like Arial.

The h tags are within a td table cell.


 

Michelle Klann

Avatar
Administrator
Total Posts:  204
Posted: 24 January 2012 05:39 PM
[ # 1 ]

That’s correct, Gmail does not support embedded CSS so you will have to write it inline.  Here is an example:

<h2 style="font-family: Times "Times New Roman", Times, serif;  font-size:18px;  
font-weight:bold;  color:#d2a548;"
>Text</h2

or

<td style="font-family: Times "Times New Roman", Times, serif;  font-size:18px;  
font-weight:bold;  color:#d2a548;"
>
   <
h2>Text</h2>
   ...
</
td