Set fonts for titles

I want to set the fonts of titles (h1, h2, etc) to be a certain font, without affecting the font for flowing text. I want to do this both in my local Obsidian, and in Publish. How do I do that?

Thanks for your help,
Ram Rachum.

Hi @cool-RR You would use css to change the fonts for example:

  --h1-font: Arial, Helvetica, sans-serif;
  --h2-font: 'Courier New', Courier, monospace;
  --h3-font: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  --h4-font: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  --h5-font: 'Times New Roman', Times, serif;
  --h6-font: Pompiere;

gives me:


  • The first font is the one it will try to use, the ones after the first it will try if the first one isnt installed.
  • Fonts with spaces in the name need to be quoted

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.