Variable: htmlize-output-type

htmlize-output-type is a customizable variable defined in htmlize.el.

Value

css

Documentation

Output type of generated HTML, one of css, inline-css, or font.

When set to css (the default), htmlize will generate a style sheet with description of faces, and use it in the HTML document, specifying the faces in the actual text with <span class="FACE">.

When set to inline-css, the style will be generated as above, but placed directly in the STYLE attribute of the span ELEMENT: <span style="STYLE">. This makes it easier to paste the resulting HTML to other documents.

When set to font, the properties will be set using layout tags
<font>, <b>, <i>, <u>, and <strike>.

css output is normally preferred, but font is still useful for supporting old, pre-CSS browsers, and both inline-css and font for easier embedding of colorized text in foreign HTML documents (no style sheet to carry around).

Source Code

;; Defined in ~/.emacs.d/elpa/htmlize-20250724.1703/htmlize.el
(defcustom htmlize-output-type 'css
  "Output type of generated HTML, one of `css', `inline-css', or `font'.
When set to `css' (the default), htmlize will generate a style sheet
with description of faces, and use it in the HTML document, specifying
the faces in the actual text with <span class=\"FACE\">.

When set to `inline-css', the style will be generated as above, but
placed directly in the STYLE attribute of the span ELEMENT: <span
style=\"STYLE\">.  This makes it easier to paste the resulting HTML to
other documents.

When set to `font', the properties will be set using layout tags
<font>, <b>, <i>, <u>, and <strike>.

`css' output is normally preferred, but `font' is still useful for
supporting old, pre-CSS browsers, and both `inline-css' and `font' for
easier embedding of colorized text in foreign HTML documents (no style
sheet to carry around)."
  :type '(choice (const css) (const inline-css) (const font))
  :group 'htmlize)