no-content-after-body
Per HTML Living Standard §13.2.6.4.17 (the "after body" insertion mode), once the parser has seen </body>, a start tag or any non-whitespace character is a parse error — the "Anything else" case switches the insertion mode back to "in body" and reprocesses the token, so the content still ends up nested inside <body> even though, in the source, it appears after </body>.
A trailing whitespace-only newline after </body> has its own, non-error case in the same insertion mode and is not reported.
❌ Examples of incorrect code for this rule
<body></body>
<p>stray paragraph</p>
✅ Examples of correct code for this rule
<body>
<p>paragraph</p>
</body>
Interface
{
"no-content-after-body": boolean
}
VALUE_DESCRIPTION
Options
{
"no-content-after-body": {
"options": {
"__OPTIONS_PROP_NAME__"?: boolean
}
}
}
| Property | Type | Default Value | Description |
|---|---|---|---|
__OPTIONS_PROP_NAME__ | boolean | "true" | OPTIONS_PROP_DESCRIPTION |
Default Severity
error