Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does <button> not have a pointer cursor on hover by default?

First, I was wondering why I need to add cursor:pointer; for a hover effect on elements like <button>, <label>, checkbox, and radio?

Second, why do <a> tags have this by default?

like image 211
Gerrit Halfmann Avatar asked Apr 10 '26 14:04

Gerrit Halfmann


1 Answers

This comes from historical perspective of web page usage. Labels are meant to be read-only. buttons, checkboxes and radios are visibly clickable by default. So, where-ever any one sees them on page, they know it can be clicked or checked. An anchor tag may hide between other text on the page, and may get hidden from view by styling, so a hover pointer over that (if they have a url to point to) will signify that this is click-able part of text, and will help in page navigation.

You can check these details in many more answers here. https://ux.stackexchange.com/questions/105024/why-dont-button-html-elements-have-a-css-cursor-pointer-by-default

and the conceptual details of mouse pointers here

like image 160
Amit Kumar Singh Avatar answered Apr 12 '26 05:04

Amit Kumar Singh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!