Skip to main content

HTML Validation

  • 3 minutes to read

The ASPxHtmlEditor automatically validates HTML code contained in an HTML View. This editor can remove all potentially harmful code such as unknown tags and attributes, script elements, client-side event handlers, URLs with script content, etc. The resulting HTML code is safe, valid, and compliant with the specified document type (the HtmlEditorHtmlEditingSettings.AllowedDocumentType property): XHTML 1.0 Transitional, HTML5, or both.

Automatic validation also helps to keep HTML code valid by correcting invalid tag hierarchies and changing invalid attribute values.

Additionally, you can use the ASPxHtmlEditor.CorrectHtml method to correct the required HTML code.

The main actions performed during validation are listed below:

For more information about editor parameters that allow you to control validation settings, see the following topic: HTML validation parameters.

See Also