Validation may fail for items with HTML5 tags in their presenation

  • When using HTML5 in item presentation or adding HTML5 tags to item fields (for example, a Rich Text field), default Sitecore item and field validation may fail.

    This may also prevent items from being approved in a workflow state. The following messages may appear in the validation results:

    • Is rendered item valid XHTML document
      The item must render as a valid XHTML document.
    • Is valid XHtml
      Field must be a valid XHtml document.

    The issue occurs because Sitecore validates the item markup and field contents using an XSD scheme validator which fails for HTML5-specific tags such as <article>, <details>, <dialog>, etc.

  • There is no validation schema for HTML5 available yet. However, it is possible to extend the current XSD schema that Sitecore uses for XHTML validation to allow some of the HTML5 tags. The original schema file is located and specified in the XHtmlSchemaFile setting in web.config:

    <setting name="XHtmlSchemaFile" value="/sitecore/shell/schemas/sitecore xhtml.xsd" />

    For example,  to allow the <article> tag, you should modify the schema file as follows:

    1. Create a new xs:element node under the root node for the <article> tag:
      <xs:element name="article">
          <xs:complexType mixed="true">
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:group ref="block" />
              <xs:group ref="inline" />
              <xs:group ref="misc" />
            <xs:attributeGroup ref="coreattrs" />
    2. Add the newly created element definition to the group of block elements:
      <xs:group name="block">
            <xs:element ref="p" />
            <xs:group ref="heading" />
            <xs:element ref="div" />
            <xs:group ref="lists" />
            <xs:group ref="blocktext" />
            <xs:element ref="fieldset" />
            <xs:element ref="table" />
            <xs:element ref="article" />

    Alternatively, it is possible to disable XHTML validation so that items with HTML5 markup can be approved in a workflow. To do this, remove Full Page XHtml and Is Xhtml rules from the Workflow field of the following items:

    • /sitecore/system/Settings/Validation Rules/Field Types/Rich Text
    • /sitecore/system/Settings/Validation Rules/Global Rules

Applies to:

CMS 6 - 8.2 Initial Release

CMS 8.2 Update-1

January 06, 2016
May 11, 2020

Reference number:

353612, 92086


  • CMS