•Validate HTML5 documents as - This option applies only to HTML5 documents. If you want to enforce XML rules for better structure and well-formedness, and to check to XHTML5, then set this option to 'XHTML5' or 'Polyglot'. The default is '(auto)'. (New v11.9915)
NOTE: If a MIME type is available for an HTML5 document, then the MIME type is used to decide whether to check to HTML5 (text/html) or XHTML5 (application/xhtml+xml). If the 'Validate HTML5 documents as' option is set to 'Polyglot', then polyglot checking is enabled regardless of the MIME type.
The common way to serve HTML is with the MIME type 'text/html', but XHTML5 must be served with the MIME type 'application/xhtml+xml'. This creates problems for older browsers like IE8, so developers may not want to serve documents with 'application/xhtml+xml' to the general public. Fortunately IE9 added support for 'application/xhtml+xml', but that still leaves a lot of older browsers, like IE8 and below, that don't support 'application/xhtml+xml'.
We recommend that web developers consider polyglot documents because:
•they can be served with 'text/html', which is widely supported,
•they can also be served with 'application/xhtml+xml',
•they can be parsed by XML parsers and can be processed and generated by XML tools,
•a single document can be treated as HTML5 or XHTML5, without the need to maintain both an HTML5 and XHTML5 version of a document,
•such documents are well-formed and follow stricter rules, and
•validating only to HTML5 will likely result in 'messier' documents which may be more difficult to create, maintain, and reuse.
For more information, please visit: