A HyperText Markup Language (HTML) cursor refers to the appearance of the mouse pointer as it is represented on the screen. Although the cursor has a set of default appearances and behaviors that are controlled by both the operating system on a computer and the web-browsing program itself, these can both be changed within an HTML document. The change in the shape of a cursor can be purely for aesthetic or design purposes, or it can be to help emphasize the utility of a component of the website. In addition to being able to change the cursor to one of the system’s pre-defined forms, it also can be changed into a custom image. There are some problems with using an HTML cursor, however, most of them arising from incomplete browser implementations of the language or operating system restrictions.
The ability to modify the state and image of an HTML cursor was almost always a function that could be achieved online through the use of some very long and inconsistently performing scripts or plug-ins, but the introduction of the second version of Cascading Style Sheets (CSS) in HTML made the process much easier and far more consistent. By changing the document object model (DOM) cursor property, the cursor as it appears within the browser’s viewing window can be modified. The actual functionality of the mouse, so far as clicking and dragging, cannot be changed in this way.
The HTML cursor can be changed to any one of a number of pre-defined shapes. Most of these shapes are employed by the operating system during normal use and include the standard pointing arrow, crosshairs, a waiting icon or arrows used when resizing windows in different directions. There also is the ability to specify a custom image to be used in place of the cursor. To specify a customer HTML cursor, the image file must be no larger than 32 pixels in width and height. It also should be designed in a file format that allows transparency so parts of the website underneath unused sections of the cursor are visible, and so the cursor itself does not appear as a solid opaque block with an icon drawn into it.
Not all browsers implement all features in the same way, so changing an HTML cursor does not always have the same results. Some browsers support different names for different system cursors, while others require some code tweaking to get a custom HTML cursor to appear. Additionally, the operating system being used and the context in which the browser is running also can prevent the cursor from being changed.