Package Structure · E-NEST
Severe HTML nesting errors
Some HTML tags in your book are nested incorrectly (e.g. a paragraph inside another paragraph), which can break rendering.
Error: Severe HTML nesting errors
Category: Package Structure
Severity: error
Auto Repair: Supported
Rule ID: E-NEST
Affected: KDP=reject, Apple=reject, Google=reject, Kobo=warning
Check this automatically with Cermify
Why this happens
- Unclosed <p> or <div> causing the next block to nest illegally.
- Block elements placed inside <p>, <span>, or <a> by a visual editor.
- List / table structure broken (li outside ul/ol, td outside tr).
- Copied HTML fragments merged without a normalizing pass.
How platforms treat it
| Platform | Result |
| KDP | reject |
| Apple Books | reject |
| Google Play | reject |
| Kobo | warning |
How Cermify detects it
- Parse each XHTML content document with a strict XML/HTML nest checker.
- Record illegal parent/child combinations and unclosed elements.
- Prioritize errors that prevent well-formed XML or known Kindle breakages.
- Surface file + approximate location for repair.
Automatic repair
Cermify can close or split common illegal nests (e.g. p-in-p) when the intent is clear. Deeply corrupted trees may require exporting a clean chapter from the source tool.
Manual fix
- Open the cited chapter and validate nesting in an XML-aware editor.
- Close or split overlapping paragraphs and divs.
- Move block content out of inline parents (p, span, a).
- Re-run epubcheck until nesting errors clear.
Examples
Paragraphs must not wrap other paragraphs.
Incorrect
<p>Opening paragraph
<p>Second paragraph nested illegally</p>
</p>
Correct
<p>Opening paragraph</p>
<p>Second paragraph nested illegally</p>
FAQ
How is this different from E-RSC005?
E-NEST focuses on structural nesting. RSC-005 also covers invalid attributes and CSS; both can appear on the same file.
Will browsers hide the problem?
Browsers forgive bad HTML; EPUB/XHTML and Kindle pipelines often do not. Fix nesting for store upload.
Can I convert everything to divs?
Prefer semantic headings and paragraphs. Blind div soup can still nest illegally and hurts accessibility.
Related errors
References
- XHTML content document constraints
- Cermify Rule Set kdp-epub-2026-07