.
+
+Headlines cannot appear within special blocks. To wrap a headline and its
+contents in e.g.
or tags, set the @code{HTML_CONTAINER}
+property on the headline itself.
+
address@hidden HTML preamble and postamble, Quoting HTML tags, HTML doctypes, HTML export
@subsection HTML preamble and postamble
@vindex org-html-preamble
@vindex org-html-postamble
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index ef7d15a..05b99bf 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -116,6 +116,7 @@
(:html-link-org-as-html nil nil org-html-link-org-files-as-html)
(:html-doctype "HTML_DOCTYPE" nil org-html-doctype)
(:html-container "HTML_CONTAINER" nil org-html-container-element)
+ (:html-html5-fancy "HTML_HTML5_FANCY" nil org-html-html5-fancy)
(:html-link-home "HTML_LINK_HOME" nil org-html-link-home)
(:html-link-up "HTML_LINK_UP" nil org-html-link-up)
(:html-mathjax "HTML_MATHJAX" nil "" space)
@@ -143,6 +144,38 @@
(defvar org-html--pre/postamble-class "status"
"CSS class used for pre/postamble")
+(defconst org-html-doctype-alist
+ '(("html4-strict" . "")
+ ("html4-transitional" . "")
+ ("html4-frameset" . "")
+
+ ("xhtml-strict" . "")
+ ("xhtml-transitional" . "")
+ ("xhtml-framset" . "")
+ ("xhtml-11" . "")
+
+ ("html5" . "")
+ ("xhtml5" . ""))
+ "An alist mapping (x)html flavors to specific doctypes.")
+
+(defconst org-html-html5-elements
+ '("article" "aside" "audio" "canvas" "details" "figcaption"
+ "figure" "footer" "header" "menu" "meter" "nav" "output"
+ "progress" "section" "video")
+ "New elements in html5.
+
+ is not included because it's currently impossible to
+wrap special blocks around multiple headlines. For other blocks
+that should contain headlines, use the HTML_CONTAINER property on
+the headline itself.")
+
(defconst org-html-special-string-regexps
'(("\\\\-" . "") ; shy
("---\\([^-]\\)" . "—\\1") ; mdash
@@ -748,7 +781,9 @@ in all modes you want. Then, use the command
'(:border "2" :cellspacing "0" :cellpadding "6" :rules "groups" :frame "hsides")
"Default attributes and values which will be used in table tags.
This is a plist where attributes are symbols, starting with
-colons, and values are strings."
+colons, and values are strings.
+
+When exporting to HTML5, these values will be disregarded."
:group 'org-export-html
:version "24.4"
:package-version '(Org . "8.0")
@@ -856,7 +891,9 @@ CSS classes, then this prefix can be very useful."
"The extension for exported HTML files.
%s will be replaced with the charset of the exported file.
This may be a string, or an alist with export extensions
-and corresponding declarations."
+and corresponding declarations.
+
+This declaration only applies when exporting to XHTML."
:group 'org-export-html
:type '(choice
(string :tag "Single declaration")
@@ -872,8 +909,7 @@ Use utf-8 as the default value."
:package-version '(Org . "8.0")
:type 'coding-system)
-(defcustom org-html-doctype
- ""
+(defcustom org-html-doctype "xhtml-strict"
"Document type definition to use for exported HTML files.
Can be set with the in-buffer HTML_DOCTYPE property or for
publishing, with :html-doctype."
@@ -882,6 +918,21 @@ publishing, with :html-doctype."
:package-version '(Org . "8.0")
:type 'string)
+(defcustom org-html-html5-fancy nil
+ "When exporting to HTML5, set this to t to use new HTML5
+ elements. This variable is ignored for anything other than
+ HTML5.
+
+For compatibility with Internet Explorer, it's probably a good
+idea to download some form of the html5shiv (for instance
+https://code.google.com/p/html5shiv/) and add it to your
+HTML_HEAD_EXTRA, so that your pages don't break for users of IE
+versions 8 and below."
+ :group 'org-export-html
+ :version "24.4"
+ :package-version '(Org . "8.0")
+ :type 'boolean)
+
(defcustom org-html-container-element "div"
"HTML element to use for wrapping top level sections.
Can be set with the in-buffer HTML_CONTAINER property or for
@@ -962,7 +1013,8 @@ You can also customize this for each buffer, using something like
(const :format " " mathml) (boolean))))
(defcustom org-html-mathjax-template
- "
+