What is the length limitation of HTML title
attribute?
There is no length limitation in either HTML 4.01 or HTML5, although long tooltips are usually a sign that you should be placing that text elsewhere, possibly before or after. (I said "usually" because xkcd uses the tooltips effectively, though the description could still be put underneath the image with the same relative effect.)
According W3C,
The title should ideally be less than 64 characters in length. That is, many applications will display document titles in window titles, menus, etc where there is only limited room. Whilst there is no limit on the length of a title (as it may be automatically generated from other data), information providers are warned that it may be truncated if long.
Check it out: The TITLE element in HTML
Titles are limited to 512 total characters in internet explorer according to MSDN.
http://msdn.microsoft.com/en-us/library/ie/ms534683(v=vs.85).aspx
The implementation in browsers differ but I think HTML 4.01 is 128 chars. I've seen limits from 80 chars up to 2000 being mentioned on the web.
I just tried this out for Chrome, Safari, and Firefox with HTML5:
Chrome limits to 1024.
Safari had no limit (I tried up to 3250)
Firefox also had no limit up to 3250. As @jukka mentioned, though, Firefox does not automatically insert linebreaks.
There is no limit in the specifications, but when you go past 48 characters, browsers will treat it differently—IE breaks the text to two or more lines, whereas Firefox doesn’t. Firefox doesn’t honor explicit line breaks in source (this is, debatably, correct behavior).
So the practical conclusion is: if you need to ask, it’s too long, and you should use some other technique. The title attribute is normally used for the “tooltip” effect, and similar effects can be created (with better usability) using CSS (and possibly JavaScript).