penderi penderi - 1 year ago 131
HTML Question

How can I use a carriage return in a HTML tooltip?

I'm currently adding verbose tooltips to our site, and I'd like (without having to resort to a whizz-bang jQuery plugin, I know there are many!) to use carriage returns to format the tooltip.

To add the tip I'm using the

attribute. I've looked around the usual sites and using the basic template of:

<a title='Tool?Tip?On?New?Line'>link with tip</a>

I've tried replacing the

  • <br />

  • &013; / &#13;

  • \r\n

  • Environment.NewLine
    (I'm using C#)

None of the above works. Is it possible?

Answer Source

It's so simple you'll kick yourself... just press enter!

<a title='Tool
Line'>link with tip</a>

Firefox won't display multi-line tooltips at all though - it will replace the newlines with nothing.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download