HTML Guides for tag name
Learn how to identify and fix common HTML validation errors flagged by the W3C Validator — so your pages are standards-compliant and render correctly across every browser. Also check our Accessibility Guides.
The document ends in the middle of a tag name, as in a final </html with no closing >, so the parser throws that unfinished tag away.
The validator only reports this when the last characters of the file are < or </ followed by letters, with nothing after them: </html, </body, <div, even </ht. The parser is still reading the tag name when the file runs out. Other endings get other messages. A bare < or </ gives End of file after “<”., and a space or line break after the name gives Saw end of file without the previous tag ending with “>”.
Usually the file has just lost its last character. The final > of a template got deleted during an edit, or a build step trimmed one byte too many. A response that the server stopped sending partway through ends the same way. If the lost tag is </html or </body, the page still looks right, because browsers close those elements at the end of the file anyway. A start tag like <script or <div is different: that element never makes it into the page.
Add the missing > or the rest of the tag. If the source file already ends with the full tag, fetch the page with curl and check the last line the server sends. A cut-off copy means something trims the HTML after the template renders it, such as an output filter or a proxy.
Invalid example
The file ends right after </html:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Opening hours</title>
</head>
<body>
<p>Open daily from 10:00 to 18:00.</p>
</body>
</html
Valid example
<!DOCTYPE html>
<html lang="en">
<head>
<title>Opening hours</title>
</head>
<body>
<p>Open daily from 10:00 to 18:00.</p>
</body>
</html>
Validate at scale.
Ship accessible websites, faster.
Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.
1K Weekly
1,000 monthly checks. Cancel anytime.
Get 1K Weekly →Join teams across 40+ countries