We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Technology

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What Is an HTML Cursor?

By Eugene P.
Updated: May 17, 2024
Views: 7,034
References
Share

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.

Share
WiseGeek is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.
Link to Sources

Editors' Picks

Related Articles

Discussion Comments
Share
https://www.wisegeek.net/what-is-an-html-cursor.htm
Copy this link
WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.

WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.