1. Creating an XHTML document
Prev |  | Next

## 1. Creating an XHTML document

The File → New dialog box allows you to choose between the following document templates:

XHTML Version | Template Name | Description
--- | --- | ---
1.0 | XHTML 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.1 | XHTML Page | File 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.0 | XHTML Page | File having a `.xhtml` suffix, starting with an XML declaration followed by `<!DOCTYPE html>` and conforming to an XHTML 5 W3C XML Schema developed by XMLmind.
HTML Page | File having a `.html` suffix, having no XML declaration, starting with `<!DOCTYPE html>` and conforming to an XHTML 5 W3C XML Schema 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.

Prev |  | Next
XMLmind XML Editor - XHTML Support | Home | 2. Opening an existing XHTML document