htmlemacsorg-mode

Exporting org-mode to HTML: In-place coloring


How can I specify the color for a piece of text that Emacs Org-Mode should use when exporting the file to HTML?

e.g.

* Here is one bullet
  ** Here is another bullet
       Here is some text that I want in BOLD RED 
       Here is some other text that I want in the default face

Solution

  • You don't say if this is a one-off or not. css stylesheet makes sense if you need styles. To just do what you describe once, you can include the HTML directive for red in your org file, as follows:

    Here is some text that I want in *@@html:<font color = "red">@@BOLD RED@@html:</font>@@*
    

    See the section Quoting HTML tags in the Org manual.