Tool tip on a button

G

Guest

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
 
R

RobG

nospam said:
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?

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

They do, at least in the browsers noted above.
 
G

Guest

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
 
R

RobG

nospam said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top