# EPUBCheck HTM_061: invalid data-* attribute, how to fix it

Source: https://epubcc.com/epubcheck/htm_061/ (updated 2026-11-04)

EPUBCheck HTM_061 is an error message: “"…" 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).” A data-* attribute name is not valid. A custom data attribute needs at least one character after the hyphen, no uppercase ASCII letters and only characters allowed in XML names.

- Official message (EPUBCheck 5.4.0): "%1$s" 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).
- Default severity: Error

## Typical causes

- Names such as data-, data-Page or data-x:y.
- Attributes generated from a script or a design tool that keeps camelCase names.

## 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. Rename the attribute in lowercase, for example data-page instead of data-Page.
3. If a script or stylesheet reads the attribute, update it to the new name too.
4. Remove the attribute if nothing in the book uses it.
5. Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.

## When it's not this

If the attribute is prefixed with a namespace (such as ibooks:something), the rules are those of custom attributes, reported as HTM_054.

## Sources

- EPUB 3.3, §6.1.2 XHTML requirements: https://www.w3.org/TR/epub-33/#sec-xhtml-req (read 2026-11-04)

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