# EPUBCheck OPF-098: link to package element, how to fix it

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

EPUBCheck OPF-098 is an error message: “The "href" attribute must reference resources, not elements in the package document, but found URL "…".” A metadata link's href points to an element inside the package document itself (a URL with #id). Link elements must reference resources, not parts of the package document.

- Official message (EPUBCheck 5.4.0): The "href" attribute must reference resources, not elements in the package document, but found URL "%1$s".
- Default severity: Error

## Typical causes

- A link written as href="#title" or content.opf#meta1 to point at metadata in the same file.
- A voicing or record link aimed at a meta element instead of a file.
- A link copied from refines syntax, which does use #id.

## How to fix it

1. Find the link element EPUBCheck points to.
2. Point href at the real file (an audio file, a record), not at the package document.
3. To describe an element of the package, use the refines attribute with #id instead of href.

## When it's not this

If a manifest item's href contains a fragment, that is OPF-091.

## Sources

- EPUB 3.3, §5.5.6 The link element: https://www.w3.org/TR/epub-33/#sec-link-elem (read 2026-11-04)

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