Skip to main content
HTML Validation

CSS: “cursor”: X is not a “cursor” value.

About This HTML Issue

The value given to the CSS cursor property is not one the specification allows, so browsers ignore the whole declaration.

The cursor property sets the pointer shown while the mouse is over an element. It accepts a fixed list of keywords, such as auto, default, pointer, text, move, help, wait, not-allowed, grab and zoom-in. Any other word is rejected, including names that sound plausible: hand, arrow, link and head are not cursor keywords. Typos and values copied from another property end up here too.

When a browser meets an unknown value, it drops the declaration and keeps the cursor the element would have had anyway, usually the inherited one or auto. A button meant to show a pointing hand ends up with the plain arrow, and nothing in the page tells you why.

The same message appears for a custom cursor image with no fallback. A url() value must be followed by a comma and a keyword, which the browser uses when the image can't be loaded. cursor: url(magnifier.png) is invalid, while cursor: url(magnifier.png), zoom-in is valid.

To fix it, replace the value with the keyword that matches what the element does (pointer for clickable elements, default for the standard arrow, text for selectable text), and end every list of url() images with a keyword.

Invalid example

The first declaration uses a word that isn't a cursor keyword, and the second has an image with no fallback:

<button type="button" style="cursor: head;">Open menu</button>
<img src="harbor.jpg" alt="Harbor at sunset" style="cursor: url(magnifier.png);">

Valid example

<button type="button" style="cursor: pointer;">Open menu</button>
<img src="harbor.jpg" alt="Harbor at sunset" style="cursor: url(magnifier.png), zoom-in;">

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?
🌍 Trusted by teams worldwide

Validate at scale.
Ship accessible websites, faster.

Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.

Scheduled Reports
API Access
Open Source Standards
€5 / week

1K Weekly

1,000 monthly checks. Cancel anytime.

Get 1K Weekly →

Join teams across 40+ countries