Skip to content
EPUBCheck · XHTML content documents

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

  1. 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.
  2. Remove base elements and make sure every link is relative to the chapter itself.
  3. Remove rp elements and keep the ruby and rt markup.
  4. Replace embed with object, which has a fallback mechanism, or with a plain image.
  5. 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_054 Custom attribute namespace ("…") must not include the string "…" in its domain.
  • HTM_056 Viewport metadata has no "…" dimension (both "width" and "height" properties are required)
  • HTM_057 Viewport "…" value must be a positive number or the keyword "device-…"
  • HTM_058 HTML documents must be encoded in UTF-8, but UTF-16 was detected.
  • HTM-051 Found Microdata semantic enrichments but no RDFa. EDUPUB recommends using RDFa Lite.
  • HTM_059 Viewport "…" 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.

FAQ

What does EPUBCheck HTM_055 mean?

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.

Is HTM_055 an error?

HTM_055 is reported as usage by default. Informative only and hidden by default: it appears when EPUBCheck runs with -u (--usage). It does not make the EPUB invalid.