# OPF-035: XHTML declared as text/html, how to fix it

Source: https://epubcc.com/epubcheck/opf-035/ (updated 2026-11-04)

EPUBCheck OPF-035 is a warning message: “Media type "text/html" is not appropriate for XHTML/OPS.” A content document is declared as text/html in an EPUB 2 package; EPUB content documents are XHTML and need application/xhtml+xml. Reading apps may treat a text/html document as an unsupported type.

- Official message (EPUBCheck 5.4.0): Media type "text/html" is not appropriate for XHTML/OPS.
- Default severity: Warning
- EPUBCheck's suggestion: Use "application/xhtml+xml" instead.

## Typical causes

- Manifests generated by tools that treat chapters as web pages.
- A manifest typed by hand using the familiar web media type.
- Files renamed from .html without changing their declaration.

## How to fix it

1. Find the manifest items with media-type="text/html".
2. Change them to media-type="application/xhtml+xml".
3. Make sure the files are well-formed XHTML (closed tags, quoted attributes, the XHTML namespace); EPUBCheck will report any parsing errors after the change.

## When it's not this

If the declared type is another deprecated EPUB 2 type, EPUBCheck reports OPF-037.

## Sources

- EPUB 3.3, §5.6.2 The item element: https://www.w3.org/TR/epub-33/#sec-item-elem (read 2026-11-04)
- EPUB 3.3, §3.2 Core media types: https://www.w3.org/TR/epub-33/#sec-core-media-types (read 2026-11-04)

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