Cermify · Error Library · KDP

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.

Severity
error
Automatic repair
Supported
Submission impact
KDP: reject
Rule ID
E-NEST
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

How platforms treat it

PlatformResult
KDPreject
Apple Booksreject
Google Playreject
Kobowarning

How Cermify detects it

  1. Parse each XHTML content document with a strict XML/HTML nest checker.
  2. Record illegal parent/child combinations and unclosed elements.
  3. Prioritize errors that prevent well-formed XML or known Kindle breakages.
  4. 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

  1. Open the cited chapter and validate nesting in an XML-aware editor.
  2. Close or split overlapping paragraphs and divs.
  3. Move block content out of inline parents (p, span, a).
  4. 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