The <!DOCTYPE> declaration specifies to the browser the HTML version used for the document, and this declaration is a strict requirement for DevExpress ASP.NET controls. DevExpress ASP.NET products render HTML code that conforms to the look and feel of web pages based on the following document types.
XHTML 1.0 Transitional. This 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.
HTML code generated by DevExpress ASP.NET controls is designed to fully comply with the XHTML 1.0 Transitional specification. In other supported document types, the code may work well but might not pass markup validation.
DevExpress controls are designed to render 100% XHTML compliant code in most control usage scenarios, with a few exceptions – as noted below.
Certain browsers do not fully support valid XHTML markup, so there is a lack of cross-browser compatibility.
Some advanced features cannot be implemented with valid XHTML code, so you are required to choose between using the feature or maintaining valid code.
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.
The doctypeMode option in the web.config file and the page's DOCTYPE should be set to the same document type definition (XHTML or HTML5).
XHTML compliance issues
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 correctly processed by some browsers.
The <embed> tag renders if the control's content is:
a video or audio file;
a flash animation file (if the component's ObjectProperties.EmbedMethod property is set to TwiceCooked).
Image Alignment Attributes
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).