Z121 Missing or Empty Href
Z121 Missing or Empty Href¶
Severity: error | Category: structural | Penalty: -1.0 pts
Z121 is triggered when an <a> tag has no href attribute (or an empty one), or when an <img> tag lacks a src attribute.
Why it matters¶
An anchor without an href or an image without a src is structurally invalid or relies on undocumented client-side scripting to function, breaking standard link-integrity checks.
Remediation¶
- Provide a valid
hreforsrcattribute. - If the tag is intended as a client-side hook (e.g.,
<a id="top"></a>), consider using standard Markdown header anchors.