aspnet-11940-common-concepts-supported-document-types.md
The <!DOCTYPE> declaration sends information to the browser about the document type (including HTML version). This declaration is a strict requirement for DevExpress ASP.NET controls. Our ASP.NET components render HTML markup that conforms to a web page’s look and feel based on the following document types.
XHTML 1.0 TransitionalThis document type definition contains all HTML elements and attributes, including presentational and deprecated elements (like font). Framesets are not allowed. The markup must also be written as a well-formed XML.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
XHTML 1.0 Strict
This document type definition contains all HTML elements and attributes, excluding presentational and deprecated elements (like font). Framesets are not allowed. The markup must also be written as a well-formed XML.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
HTML5The current major version of the HTML standard.
<!DOCTYPE HTML>
DevExpress ASP.NET controls generate HTML markup that complies with the XHTML 1.0 Transitional specification. In other supported document types, the code may work, but might not pass markup validation. DevExpress controls are designed to render 100% XHTML compliant code in most usage scenarios, with a few exceptions – as noted below.
Note
If there is no DOCTYPE element or the DOCTYPE is unclear, the browser renders a page in Quirks mode. Additionally, you will not be able to use an HTML Validator to check page coding, because validation requires a DOCTYPE declaration.
Note
The web.config file’s doctypeMode option and the page’s DOCTYPE should be set to the same document type definition (XHTML or HTML5).
You may encounter the following XHTML compliance issues.
Under certain circumstances, the ASPxObjectContainer component renders the <embed> tag, which is invalid according to the XHTML specification. This tag is required for cross-browser compatibility, since the <object> tag (which is a valid replacement for the <embed> tag) is not processed correctly by some browsers.
The <embed> tag renders if the control’s content is:
Some DevExpress ASP.NET controls expose properties that specify alignment for embedded images. These properties are of the ImageAlign type, which is an enumeration. Although this is a standard ASP.NET enumeration, some of its values are invalid based on the XHTML specification (e.g., AbsBottom, AbsMiddle, Baseline and TextTop are invalid values).
See Also
Blog: HTML5 and XHTML Strict - New Doctypes Supported for ASP.NET Products