# How to change headline fonts in org-html-export?

This question concerns org-mode and its org-html-export feature.

When exporting from .org to .html, the highest headlines (those with the fewest *s) export to a gigantic font.

Is there any way to reduce the size of this font?

Thanks for any help.

Yes, there is. You can write a CSS stylesheet and include it in your exported html files.

You can set the global variables org-html-head and/or org-html-head-extra to any HTML that you want to include in every exported file, or you can add directives to your .org files that override these variables just for that specific file. For example:

 #+HTML_HEAD: <link rel="stylesheet" type="text/css" href="style1.css" />
#+HTML_HEAD_EXTRA: <link rel="alternate stylesheet" type="text/css" href="style2.css" />


This and other useful information can be found in chapter 12.6.11 of the Org Mode manual. You can run M-: (info "(org)CSS Support") to jump right to it.

• Would div.outline-N be the right variable to adjust? (I don't have much experience with HTML.) – user14743 Feb 7 '17 at 18:23
• I am able to reduce the heading font size using div.outline-N, but for some reason it reduces both the size of the headline /and/ the size of the text beneath it, making the latter unreadable. – user14743 Feb 7 '17 at 18:30
• Got it. The right html variable is outline-N hN, where N is some number. In my case I needed outline-2 h2. Thanks! – user14743 Feb 7 '17 at 18:34
• Yes, that looks like the right idea. h1 through h6 are the html tags for headings. You might select just .outline-N alone though, if you export things with more than 6 levels of outlines. – db48x Feb 7 '17 at 22:44