# EPUBCheck HTM-045: empty href in a link, how to fix it

Source: https://epubcc.com/epubcheck/htm-045/ (updated 2026-11-04)

EPUBCheck HTM-045 is a usage message: “Encountered empty href.” A link has an empty href, which points back to the same document. It is valid, and EPUBCheck only reports it as a usage note so you can check that a self-link was intended.

- Official message (EPUBCheck 5.4.0): Encountered empty href.
- Default severity: Usage
- EPUBCheck's suggestion: Empty hrefs are valid self-references.  These should be validated to ensure that this is the desired intent.

## Typical causes

- Placeholder links that were never filled in.
- Links whose target was removed by an editor or a converter that could not resolve it.

## How to fix it

1. Open the file EPUBCheck names (the message gives the path, line and column) in a text or EPUB editor such as Sigil, or unzip the EPUB and open it there.
2. Give the link a real target, such as another chapter or a fragment like #note-3.
3. If it should not be a link at all, remove the a element and keep its text.
4. Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.

## When it's not this

If the href points to a fragment that does not exist, that is RSC-012, not HTM-045.

## Sources

- EPUBCheck 5.4.0 message texts (MessageBundle.properties, w3c/epubcheck on GitHub): https://github.com/w3c/epubcheck/blob/v5.4.0/src/main/resources/com/adobe/epubcheck/messages/MessageBundle.properties (read 2026-11-04)

Message text and severity: EPUBCheck (W3C, BSD-3-Clause). Explanation: EpubCC.
