Skip to content
EPUBCheck · Stylesheets

EPUBCheck CSS-015: alternate CSS without title

Updated:

EPUBCheck CSS-015 is an error message: “Alternative style sheets must have a title.” An alternative style sheet has no title attribute. A link with rel="alternate stylesheet" needs a title, because the title is what a reading app shows when offering the alternative style.

The official message

Alternative style sheets must have a title.

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

  • A link element for an alternate style written without title.
  • A night or vertical-writing style added by a tool that left the title out.

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. Add a title attribute that names the style, for example <link rel="alternate stylesheet" title="Night" href="night.css" type="text/css"/>.
  3. If the stylesheet should always apply, change rel to plain stylesheet instead.
  4. Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.

When it's not this

If the alternate style sheets carry conflicting style tags, see CSS-005.

Terms used here

Other CSS messages

  • CSS-019 CSS font-face declaration has no attributes.
  • CSS-008 An error occurred while parsing the CSS: ….
  • CSS-007 Font-face reference "…" refers to non-standard font type "…".
  • CSS-006 CSS selector specifies fixed position.
  • CSS-005 Conflicting alternate style tags found: ….
  • CSS-004 CSS documents must be encoded in UTF-8, detected …;

Sources

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.

FAQ

What does EPUBCheck CSS-015 mean?

EPUBCheck CSS-015 is an error message: “Alternative style sheets must have a title.” An alternative style sheet has no title attribute. A link with rel="alternate stylesheet" needs a title, because the title is what a reading app shows when offering the alternative style.

Is CSS-015 an error?

CSS-015 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.