element-permitted-order
Angular templatesHTMLVue / SvelteVue / Sveltecorrectnessno fixdefault: offhtml/html-validate-standard
What it does
Section titled “What it does”Reports children that are out of the order the parent requires (<thead> and <tfoot> before <tbody>, <head> before <body>, <summary> first in <details>).
Why it matters
Section titled “Why it matters”The browser either reorders them or treats the later one as stray content, so the page shows something other than the order written.
To fix, put the children in the required order.
Example
Section titled “Example”...<table><tbody></tbody><thead></thead></table>...<a href="x"><img alt="logo" src="a"></a><a href="x">text</a>...Configuration
Section titled “Configuration”angular: lint: rules: element-permitted-order: warn # off (default), warn, errorhtml: lint: rules: element-permitted-order: warn # off (default), warn, errorsvelte: lint: rules: element-permitted-order: warn # off (default), warn, errorvue: lint: rules: element-permitted-order: warn # off (default), warn, errorEnabled by the presets: html/html-validate-standard.
Suppress one line with sudsy-disable-next-line element-permitted-order in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.
| Tool | Rule | Match | What differs |
|---|---|---|---|
| html-validate | element-permitted-order |
partial | the content model of html-validate (data/model.txt); elements that no model row names are not judged |