Types of validity checks

On-the-fly validation is available for all Web content files and is performed
as you edit the file. WebStorm checks well-formedness, that is, detects various violations of
syntax requirements, such as unclosed tags, wrong end-tag name, duplicate tags, unresolved links,
etc. All encountered errors are highlighted in the editor.

However, this form of code validation is rather soft, that is, not all requirements are
taken into account.

Full validation involves structure validation in addition to well-formedness
check. Full validation is available for files that are
associated with an XSD (XML Schema Definition) Schema
or contain a
Data Type Definition (DTD).
WebStorm checks whether the structure of your XML file complies with the structure defined in the
corresponding DTD or Schema.

The results of full validation are provided as a Message View.

Choosing the default HTML language level

Normally, an HTML or an XHTML file has the <!DOCTYPE> declaration which states the language level
of the used in the source code from the file. This language level is used as a standard against which the contents of the file are validated.
If an HTML or an XHTML file does not have a <!DOCTYPE> declaration, the contents of the file will be validated
against the default standard (schema).

Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or
WebStorm | Preferences for OS X.
Expand the Languages&Frameworks node, and then
click Default XML Schemas under Schemas and DTDs.

Choosing the default schema to validate XML files

Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or
WebStorm | Preferences for OS X.
Expand the Languages&Frameworks node, and then
click Default XML Schemas under Schemas and DTDs.