# End of file seen when looking for tag name. Ignoring tag.

> Canonical HTML version: https://rocketvalidator.com/html-validation/end-of-file-seen-when-looking-for-tag-name-ignoring-tag
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

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`:

```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

```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>
```
