Axinom Logo

KB10064: Does produce XHTML-compatible pages? does not prevent you from creating XHTML compatible output.


You aim for XHTML-compatibility for the HTML-pages on your site.


The most important principle here is: template developer is the one who defines the HTML. So it is mostly up to you to fullfill XHTML requirements.

You have to consider it everywhere where you produce HTML:

  • Templates (their ASPX)
  • Structure Elements (ASCX)
  • Any code behing which produces HTML-output

The only part of the page which is not directly under your control is the output of the text editor. uses tinyMCE as a text editor. If properly configured it can produce valid XHTML. The key part of it is to define a white list of all allowed elements and attributes. In tinyMCE you do it setting the value of "valid_elements". In you can do it even more easily defining HtmlRules in CmsSite.xml.

For additional information regarding tinyMCE condifuration please refer to tinyMCE documentation.

If you have a particular issue in this field, please contact our support directly.

Tips on XHTML compatibility

Here are some simple and obvious things you should consider when writting XHTML compatible HTML. Even if you don't aim for strict validation of your documents, you can start considering some points (like low case) to avoid problems in the future.

  • All elements, attributes and fixed attribute values (like "center") are written in low case
  • Basic structure of HTML-document must be strictly followed (html / head / body)
  • No empty elements - elements like <br> or <hr> must be used in the form <br /> or <br></br>
  • Every element must be closed (in HTML some closing tags are optional, in XHTML all closing tags are mandatory)
  • Attribute values must be quoted (align="center", not just align=center)
  • Attributes without values are not supported. Always specify a value, even if it just repeats the attribute name (e.g. nowrap="nowrap")
  • Anchors are defined with <a id="...">, not with <a name="...">

XHTML Validation

For correct validation of code in to XHTML , you would have to define certain parameters in the web.config files, e.g. like this:

<!-- W3C Validator//-->
<case match="^W3C_Validator">