Search code examples
htmlgoogle-chromefirefoxbrowserline-breaks

"&#013;" doesn't produce a <br> on chrome


The code &#013; works to create a <br> in a tooltip in Firefox, like this:

<div title:"Line1&#013;Line2">hover me</div>

http://jsfiddle.net/c46n4c71/

But on Chrome, it just displays as one line.

Am I doing something wrong? Is there another similar piece of code that works on both browsers?


Solution

  • Apparently, the "universally accepted" line break character is &#10;

    <div title="Line1&#10;Line2">Hover and see two lines</div>

    Ref: Web Tooltip "universally accepted" linebreak character?