Require attributes to be separated by whitespace

Rule ID:
attr-spacing
Category:
HTML Syntax and concepts
Standards:
  • HTML5

In HTML attributes must be separated by whitespace (commonly a regular space).

Rule details

Examples of incorrect code for this rule:

<input type="submit"class="foo">
error: No space between attributes (attr-spacing) at inline:1:21:
> 1 | <input type="submit"class="foo">
    |                     ^^^^^


1 error found.

Examples of correct code for this rule:

<input type="submit" class="foo">