Skip to content
EPUBCheck · XHTML content documents

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-045 Encountered empty href.
  • HTM-047 Viewport metadata "…" has a syntax error
  • HTM-048 SVG Fixed-Layout Documents must have a "viewBox" attribute (on the outermost "svg" element).
  • HTM_055 The "…" element should not be used (discouraged construct)
  • HTM_057 Viewport "…" 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.

FAQ

What does EPUBCheck HTM-046 mean?

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.

Is HTM-046 an error?

HTM-046 is reported as error by default. 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.