EPUBCheck HTM_055: discouraged HTML element
Updated:
EPUBCheck HTM_055 is a usage message: “The "…" element should not be used (discouraged construct).” The document uses an HTML element that EPUB discourages. EPUB 3.3 lists base, rp and embed as discouraged constructs because they cause interoperability problems; EPUBCheck names the element and reports it as a usage note.
The official message
The "%1$s" element should not be used (discouraged construct)
- 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
- A base element copied from a web page, which can make relative links point to a website.
- rp elements around ruby annotations, which EPUB 3 reading apps do not need.
- An embed element used for scripted or interactive content.
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.
- Remove base elements and make sure every link is relative to the chapter itself.
- Remove rp elements and keep the ruby and rt markup.
- Replace embed with object, which has a fallback mechanism, or with a plain image.
- Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.
When it's not this
If the element is outdated rather than discouraged, EPUBCheck reports it as OBS-001.
Terms used here
Other HTM messages
HTM_054Custom attribute namespace ("…") must not include the string "…" in its domain.HTM_056Viewport metadata has no "…" dimension (both "width" and "height" properties are required)HTM_057Viewport "…" value must be a positive number or the keyword "device-…"HTM_058HTML documents must be encoded in UTF-8, but UTF-16 was detected.HTM-051Found Microdata semantic enrichments but no RDFa. EDUPUB recommends using RDFa Lite.HTM_059Viewport "…" property must not be defined more than once, but found values […].
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.