1. Creating an XHTML document

The FileNew dialog box allows you to choose between the following document templates:

XHTML VersionTemplate NameDescription
1.0XHTML Page (Strict)File having a .xhtml suffix, starting with an XML declaration (<?xml version="1.0"?>) and a <!DOCTYPE> pointing to the XHTML 1.0 Strict DTD.
HTML Page (Strict)

File having a .html suffix, having no XML declaration[a] and starting with a <!DOCTYPE> pointing to the XHTML 1.0 Strict DTD.

This document template is a well-formed, valid XHTML file which is intended to be seen by Web browsers as an HTML file.

XHTML Page (Transitional)File having a .xhtml suffix, starting with an XML declaration and a <!DOCTYPE> pointing to the XHTML 1.0 Transitional DTD.
HTML Page (Transitional)

File having a .html suffix, having no XML declaration and starting with a <!DOCTYPE> pointing to the XHTML 1.0 Transitional DTD.

This document template is a well-formed, valid XHTML file which is intended to be seen by Web browsers as an HTML file.

1.1XHTML PageFile having a .xhtml suffix, starting with an XML declaration and a <!DOCTYPE> pointing to the XHTML 1.1 DTD.
HTML Page

File having a .html suffix, having no XML declaration and starting with a <!DOCTYPE> pointing to the XHTML 1.1 DTD.

This document template is a well-formed, valid XHTML file which is intended to be seen by Web browsers as an HTML file.

5.xXHTML PageFile having a .xhtml suffix, starting with an XML declaration followed by <!DOCTYPE html> and conforming to an XHTML 5 XML Schema and Schematron developed by XMLmind. More information in About the XHTML 5 XML Schema and Schematron developed by XMLmind.
HTML Page

File having a .html suffix, having no XML declaration, starting with <!DOCTYPE html> and conforming to an XHTML 5 XML Schema and Schematron developed by XMLmind. More information in About the XHTML 5 XML Schema and Schematron developed by XMLmind.

This document template is a well-formed, valid XHTML file which is intended to be seen by Web browsers as an HTML file.

[a] This implies that the encoding of the file must be UTF-8 for this file to be successfully opened in an XML editor.

This is enforced by the fact that all document templates called "HTML Page" contain:

 <meta content="text/html; charset=UTF-8" 
       http-equiv="Content-Type" />

All the above document templates should be highly interchangeable between Web browsers and XML editors, however it is worth keeping in mind the following points:

  • If you want to feed your XHTML document directly to a Web browser, choose a document template called "HTML Page".

  • If you want to feed your XHTML document directly to a Web browser but your document also contains MathML, choose a document template called "XHTML Page".

  • If your XHTML document is a building block which is intended to be processed by an XML based publishing system, choose a document template called "XHTML Page".

  • More information in Activating Browser Modes with Doctype.

[Note]About the XHTML 5 XML Schema and Schematron developed by XMLmind

Combined together the XHTML 5 XML Schema and Schematron developed by XMLmind[1] implement most of the conformance requirements for authors specified in the HTML Living Standard (starting from the 2019-07-18 update). There are differences though:

  • Attribute id may not contain space characters.

  • Attributes like class, rel, itemref, etc which contain a list of tokens may not be completely empty.

  • For compatibility with older HTML 5.x W3C Recommendations:

    • The table element may have a border="1" or border="" attribute (which both means: table has a border).

    • The style element may have a type="text/css" or type="" attribute (which both means: it's a CSS stylesheet).

Note that our in-house XHTML 5 XML Schema supports data-* attributes, ARIA role and aria-* attributes and also custom elements.



[1] These are found in XXE_install_dir/addon/config/xhtml/xsd/5/xhtml5.xsd (XML schema) and xhtml5.sch (Schematron).