Add line break within tooltips

Aakash Chakravarthy picture Aakash Chakravarthy · Jul 27, 2010 · Viewed 220.4k times · Source

How can line breaks be added within a HTML tooltip?

I tried using <br/> and \n within the tooltip as follows:

<a href="#" title="Some long text <br/> Second line text \n Third line text">Hover me</a>

However, this was useless and I could see the literal text <br/> and \n within the tooltip. Any suggestions will be helpful.

Answer

Fred Senese picture Fred Senese · Feb 2, 2012

Just use the entity code &#013; for a linebreak in a title attribute.