Next: , Previous: HTML export, Up: HTML export

12.5.1 HTML export commands

C-c C-e h     (org-export-as-html)
Export as a HTML file. For an Org file, the HTML file will be myfile.html. The file will be overwritten without warning. If there is an active region1, only the region will be exported. If the selected region is a single tree2, the tree head will become the document title. If the tree head entry has, or inherits, an EXPORT_FILE_NAME property, that name will be used for the export.
C-c C-e b     (org-export-as-html-and-open)
Export as a HTML file and immediately open it with a browser.
C-c C-e H     (org-export-as-html-to-buffer)
Export to a temporary buffer. Do not create a file.
C-c C-e R     (org-export-region-as-html)
Export the active region to a temporary buffer. With a prefix argument, do not produce the file header and footer, but just the plain HTML section for the region. This is good for cut-and-paste operations.
C-c C-e v h/b/H/R
Export only the visible part of the document.
M-x org-export-region-as-html
Convert the region to HTML under the assumption that it was in Org mode syntax before. This is a global command that can be invoked in any buffer.
M-x org-replace-region-by-HTML
Replace the active region (assumed to be in Org mode syntax) by HTML code.

In the exported version, the first 3 outline levels will become headlines, defining a general document structure. Additional levels will be exported as itemized lists. If you want that transition to occur at a different level, specify it with a numeric prefix argument. For example,

     C-2 C-c C-e b

creates two levels of headings and does the rest as items.


[1] This requires transient-mark-mode be turned on.

[2] To select the current subtree, use C-c @.