I'm starting a new thread for this since the previous discussion was buried in with something tangential. I've attached what I think is a working patch to allow ox-html to export to different flavors of (X)HTML. It works via `org-html-doctype': in addition to setting it to a doctype string directly, you can also set it to one of the following (defaults to xhtml-strict): html4-strict html4-transitional html4-frameset xhtml-strict xhtml-transitional xhtml-framset xhtml-11 html5 The doctype will be set correctly, and the HTML output will be adjusted to conform to the requirements of that doctype, with No Errors Whatsoeverâ„¢. The results validate, anyway... I'm not proud of some of the implementation (self-closing vs non-self-closing tags are ugly, and I wish org-html-html5-p and org-html-xhtml-p were variables, not functions), but there it is, it seems to work. If this is deemed okay I'll send a version of the patch with a proper commit message, and also updated documentation. And once that's done I've got another that builds on this, allowing you to use stuff like and