HTML Validation

  • 3 minutes to read

The ASPxHtmlEditor automatically performs the validation of 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 always safe, valid, and compliant with the specified document type (via 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 process any required HTML code to make it valid.

The main actions performed during validation are listed below:

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

See Also