By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,817 Members | 2,152 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,817 IT Pros & Developers. It's quick & easy.

Tool tip on a button

P: n/a
Hi

What the easiest way to show a tooltip on a button ?

I realise that a link can easily have a
tooltip using the title attribute. And so can images but not buttons??
Why dosen't buttons in html have tool tips ? its 2005!

mike

Oct 5 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
nospam wrote:
Hi

What the easiest way to show a tooltip on a button ?
The value of the title attribute is shown as a tooltip in most browsers.
Give your button a title, it works in Firefox and IE.

I realise that a link can easily have a
tooltip using the title attribute. And so can images but not buttons??
Did you try it?

<URL:http://www.w3.org/TR/html4/interact/forms.html#edef-INPUT>


Why dosen't buttons in html have tool tips ? its 2005!


They do, at least in the browsers noted above.
--
Rob
Oct 5 '05 #2

P: n/a
Thanks i did try it, after i posted ! and it does work. The the MS
script editor says its an invalid tag - but works in IE! (typical).
This link you gave (html standards?) note doesn't have the 'title' attr
/ must not be standard but works..
- but thanks anyway

Oct 5 '05 #3

P: n/a
nospam wrote:
Thanks i did try it, after i posted ! and it does work. The the MS
script editor says its an invalid tag - but works in IE! (typical).
It may say it is an invalid attribute for that tag, in which case either
it is wrong or you have an incompatible doctype.

The W3C validator is quite happy with it as HTML 4 strict, I'll trust that.
This link you gave (html standards?) note doesn't have the 'title' attr
/ must not be standard but works..
- but thanks anyway


The link I gave is to the W3C HTML 4 specification. Follow the link to
the specification for an input element, then scroll down to 'Attributes
defined elsewhere' you will find the title attribute listed.

You can also go to the top or bottom of the page and click on the
'attributes' link. Then look for the title attribute, where it says
"All elements but BASE, BASEFONT, HEAD, HTML, META, PARAM, SCRIPT,
TITLE" can have a title attribute.

Input elements can most definitely have a title attribute, and a button
is a type of input element.

--
Rob
Oct 5 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.