Supported Document Types
- 3 minutes to read
<!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 Transitional
- FThis 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">
- The current major version of the HTML standard.
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.
- 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 web.config file's doctypeMode option 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 processed correctly by some browsers.
<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).