Tooltips for Button elements

Is it possible to create a tooltip for an html button. Its the normal HTML button and there is no Title attribute as it is there for some html controls. Any thoughts or comments?


Simply add a title to your button.

<button title="Hello World!">Sample Button</button>

both <button> tag and <input type="button"> accept a title attribute..


Use title attribute. It is a standard HTML attribute and is by default rendered in a tooltip by most desktop browsers.


For everyone here seeking a crazy solution, just simply try

title="your-tooltip-here"

in any tag. I've tested into td's and a's and it pretty works.


A button accepts a "title" attribute. You can then assign it the value you want to make a label appear when you hover the mouse over the button.

<button type="submit" title="Login">
Login</button>