I'd like to know if it's possible to force a newline to show in the tooltip when using title property of a TD. something like
<td title="lineone \n linetwo \n etc...">
Can this be done?
I'd like to know if it's possible to force a newline to show in the tooltip when using title property of a TD. something like
<td title="lineone \n linetwo \n etc...">
Can this be done?
This should be ok, but is IE specific:
<td title="lineone
linetwo
etc...">
As others have mentioned, the only other way is to use and HTML + JavaScript based tooltip if your only interested in the tooltip. If this is for accessibility then you will probably need to stick to just single lines for consistancy.
If you're looking to put line breaks into the tooltip that appears on mouseover, there's no reliable crossbrowser way to do that. You'd have to fall back to one of the many Javascript tooltip code samples
The Extensible Markup Language (XML) 1.1 W3C Recommendation say
« All line breaks MUST have been normalized on input to #xA as described in 2.11 End-of-Line Handling, so the rest of this algorithm operates on text normalized in this way. »
The link is http://www.w3.org/TR/2006/REC-xml11-20060816/#AVNormalize
Then you can write :
<td title="lineone 
 linetwo 
 etc...">