1

When I provide a longer title value for an element in IE some of its values gets lost.

By looking into the below link. I found that IE trims the title value to 512.

[Link]http://msdn.microsoft.com/en-us/library/ie/ms534683%28v=vs.85%29.aspx

Is there any way this count(512) could be increased?

Strawberry
  • 33,750
  • 13
  • 40
  • 57
Eddy
  • 37
  • 9
  • 2
    The very fact that your title attribute is longer than 512 characters worries me. Can you tell us why it is so long? – christopher Aug 05 '13 at 09:27
  • @Chris It is a help text which can be provided by the end user. Currently we accept up to 1000 characters. Kindly share your thoughts. – Eddy Aug 05 '13 at 09:34
  • But why should it be stored in the title attribute? Doesn't it make more sense to store it in a different element (like a hidden element)? – christopher Aug 05 '13 at 09:39
  • Related: [Max length of Title Attribute](http://stackoverflow.com/questions/8516235/max-length-of-title-attribute) – Álvaro González Aug 05 '13 at 09:40
  • @Chris Actually this help text will be stored in the database. So when user navigates to the page it will be shown as the help text for an activity. – Eddy Aug 05 '13 at 09:44
  • Okay, so there's really no need to store it in the title attribute of a HTML page. I would recommend looking into an alternative method of storage, rather than trying to change IE values. – christopher Aug 05 '13 at 09:46
  • title should never be that long... it will kill the user experience.. – Edi Feb 23 '16 at 10:30

2 Answers2

2

Is there any way this count(512) could be increased?

No. This will have been set when IE's code was written. The IE developers will have chosen 512 characters as a sensible maximum for the title attribute.

The fact that you need to store more than 512 characters in it is a code smell and you should be looking at storing that data in a different way, or you need to shorten the string yourself to keep only the data you need.

Stackoverflow, for example, only shows some of a post when hovering over it on the homepage, not the whole post. The tooltip would be too large for one, and some browsers hide the tooltip after a short amount of time making reading up to 512 characters let alone more very difficult.

Bojangles
  • 99,427
  • 50
  • 170
  • 208
1

Titles (or Tooltips) are limited to Total 512 characters in Internet Explorer. Please refer to following link: http://msdn.microsoft.com/en-US/library/ie/ms534683%28v=vs.85%29

Chirag
  • 4,046
  • 1
  • 33
  • 24