HTM-046
Updated:
EPUBCheck HTM-046 is an error message: “Fixed layout document has no "viewport" meta element.” A fixed-layout XHTML document has no viewport meta element, so reading apps do not know its page size.
The official message
Fixed layout document has no "viewport" meta element.
- Default severity
- Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
- EPUBCheck version
- 5.4.0
Typical causes
- Fixed-layout pages written without the viewport declaration.
How to fix it
- Add a viewport in the head with the page's width and height in pixels, for example
<meta name="viewport" content="width=1200, height=1600"/>.
Terms used here
Other HTM messages
HTM-045Encountered empty href.HTM-047Viewport metadata "…" has a syntax errorHTM-048SVG Fixed-Layout Documents must have a "viewBox" attribute (on the outermost "svg" element).HTM_055The "…" element should not be used (discouraged construct)HTM_057Viewport "…" value must be a positive number or the keyword "device-…"
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EPUBLab.