# EPUBCheck HTM-011: undeclared named entity, how to fix it

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

EPUBCheck HTM-011 is an error message: “Entity is undeclared.” A named entity is used that the document does not declare. XML only knows &amp;, &lt;, &gt;, &quot; and &apos;, so HTML names such as &nbsp; break the XHTML and the chapter may not open at all.

- Official message (EPUBCheck 5.4.0): Entity is undeclared.
- Default severity: Error
- EPUBCheck's suggestion: Define the entity or use the numbered entity instead.

## Typical causes

- HTML entities such as &nbsp;, &mdash;, &hellip; or &copy; pasted into XHTML.
- Text exported from a word processor or a web page, where HTML entity names are normal.

## 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. Replace each named entity with a numeric reference (&#160; for a non-breaking space, &#8212; for an em dash, &#8230; for an ellipsis) or type the character itself in UTF-8.
3. Search the whole book for & followed by letters to catch the other occurrences at once.
4. Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.

## When it's not this

If the entity is declared in the DOCTYPE through an external file, the message is HTM-003.

## Sources

- EPUB 3.3, §3.9 XML conformance: https://www.w3.org/TR/epub-33/#sec-xml-constraints (read 2026-11-04)
- EPUB 3.3, §6.1.2 XHTML requirements: https://www.w3.org/TR/epub-33/#sec-xhtml-req (read 2026-11-04)

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