Skip to main content

HTML Guide

Non-space character after body.

Placing text or non-space characters between the </body> and </html> tags is not allowed.

According to the HTML specification, the </body> tag must be immediately followed by either whitespace (spaces, tabs, newlines) or the closing </html> tag, with no visible content or other characters, as the body of the document must end before </body>. Any characters appearing after </body> are considered outside the document body and violate W3C compliance.

Invalid example:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Example</title>
  </head>
  <body>
    Content goes here.
  </body> this is invalid
</html>

Valid example:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Example</title>
  </head>
  <body>
    Content goes here.
  </body>
</html>

Ensure that nothing except optional whitespace appears after </body> and before </html> to resolve this validation issue.

Learn more:

Related W3C validator issues