Search code examples
cssfont-face

I want my <h1> to use a font I have downloaded


I am creating am email flyer and I was to be able to use a custom font for my headers (<h1>), not the whole page.

this is the code I am using but it doesn't seem to work when I view it in Outlook. Is this a CSS problem or does Outlook not deal with the code well?

I have the font file in the same location as my html file too.

@font-face {
font-family:Bebas;
src:url(BEBAS__.TTF);
}

Solution

  • Problem is the font path. You have to give absolute path for your font to work on email clients.

    For Instance,

    src:url(BEBAS__.TTF); which should be converted to something like this src:url(http://www.yourdomain.com/BEBAS__.TTF);