Style cursor Property
The Style object
Definition and Usage
The cursor property sets or returns the type of cursor displayed for the mouse pointer.
Syntax
Set the cursor property:
Object.style.cursor="
value
"
Return the cursor property:
Object.style.cursor
| Value | Description |
|---|---|
| auto | Default. The cursor set by the browser (usually an arrow). |
| crosshair | The cursor is rendered as a crosshair. |
| default | The default cursor (usually an arrow). |
| e-resize | An arrow pointing right (east), indicating that the element is resizable and the edge of the rectangular box can be moved right (east). |
| help | An arrow with a question mark, indicating available help. |
| move | A crossed arrow, indicating that an object can be moved. |
| n-resize | An arrow pointing up (north), indicating that the element is resizable and the edge of the rectangular box can be moved up (north). |
| ne-resize | An arrow pointing northeast, indicating that the element is resizable and the edge of the rectangular box can be moved up and right (north/east). |
| nw-resize | An arrow pointing northwest, indicating that the element is resizable and the edge of the rectangular box can be moved up and left (north/west). |
| pointer | The cursor is rendered as a pointer indicating a link (a hand). |
| s-resize | An arrow pointing down (south), indicating that the element is resizable and the edge of the rectangular box can be moved down (south). |
| se-resize | An arrow pointing southeast, indicating that the element is resizable and the edge of the rectangular box can be moved down and right (south/east). |
| sw-resize | An arrow pointing southwest, indicating that the element is resizable and the edge of the rectangular box can be moved down and left (south/west). |
| text | This cursor indicates text. |
| url | The URL of a custom cursor to be used.Tip: Always define a generic cursor at the end of this list, in case no usable cursor is defined by the URL. |
| w-resize | An arrow pointing left (west), indicating that the element is resizable and the edge of the rectangular box can be moved left (west). |
| wait | This cursor indicates that the program is busy (usually a watch or hourglass). |
Browser support





All major browsers support the cursor property.
Example
Example
Change the cursor:
Move the mouse over this text.
Try it »
More examples
More cursors
Displays all available cursors.
The Style object