EPUBCheck HTM_060b: viewport that will be ignored
Updated:
EPUBCheck HTM_060b is a usage message: “EPUB reading systems must ignore viewport meta elements in reflowable documents; viewport declaration "…" will be ignored.” A viewport meta element will be ignored by reading apps, so it has no effect. EPUBCheck reports this usage note in two cases. HTM_060b is a viewport in a reflowable document, where reading apps must ignore it. HTM_060a is a second (or later) viewport in a fixed-layout document, where only the first one counts.
The official message
EPUB reading systems must ignore viewport meta elements in reflowable documents; viewport declaration "%1$s" will be ignored.
- Default severity
- Usage. Informative only and hidden by default: it appears when EPUBCheck runs with -u (--usage). It does not make the EPUB invalid.
- EPUBCheck version
- 5.4.0
EPUBCheck prints this ID with an underscore instead of a hyphen; this page uses the ID exactly as EPUBCheck reports it.
%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.
Typical causes
- Head content copied from web pages, which usually carry width=device-width, into reflowable chapters (HTM_060b).
- Fixed-layout templates reused for reflowable chapters (HTM_060b).
- Duplicated head content in a fixed-layout page, leaving two viewport elements (HTM_060a).
How to fix it
- Open the file EPUBCheck names (the message gives the path, line and column) in a text or EPUB editor such as Sigil, or unzip the EPUB and open it there.
- In a reflowable document, remove the viewport meta element: it does nothing there.
- In a fixed-layout document, keep only the first viewport meta element, with both width and height, and remove the others.
- Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.
When it's not this
If a single viewport repeats width or height inside its content attribute, that is HTM_059.
Also reported as
HTM_060a(usage): EPUB reading systems must ignore secondary viewport meta elements in fixed-layout documents; viewport declaration "%1$s" will be ignored.
Terms used here
Other HTM messages
HTM_059Viewport "…" property must not be defined more than once, but found values […].HTM_061"…" is not a valid custom data attribute (it must have at least one character after the hyphen, be XML-compatible, and not contain ASCII uppercase letters).HTM_058HTML documents must be encoded in UTF-8, but UTF-16 was detected.HTM_062SVG "xlink:href" attribute is deprecated; an "href" attribute should be used instead.HTM_057Viewport "…" value must be a positive number or the keyword "device-…"HTM_056Viewport metadata has no "…" dimension (both "width" and "height" properties are required)
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.