12.7 HTML Export

Org mode contains an HTML exporter with extensive HTML formatting compatible with XHTML 1.0 strict standard.

C-c C-e h h (org-html-export-to-html)

Export as HTML file with a ‘.html’ extension. For ‘myfile.org’, Org exports to ‘myfile.html’, overwriting without warning. C-c C-e h o exports to HTML and opens it in a web browser.

The HTML export backend transforms ‘<’ and ‘>’ to ‘&lt;’ and ‘&gt;’. To include raw HTML code in the Org file so the HTML export backend can insert that HTML code in the output, use this inline syntax: ‘@@html:...@@’. For example:

@@html:<b>@@bold text@@html:</b>@@

For larger raw HTML code blocks, use these HTML export code blocks:

#+HTML: Literal HTML code for export

#+BEGIN_EXPORT html
  All lines between these markers are exported literally
#+END_EXPORT