I sometimes use the fantastic jQuery qTip plugin for some more intelligent HTML tooltips in my web systems, and the other day I came across a need to insert a line break into my tooltip text. It turns out, to achieve this is relatively simple, but the solution is a little harder to find on the web than what it should be.

Translated, I’m saving it here for future reference for myself.

Ignoring the various other ways involving CSS manipulation, etc., one of the easiest ways of adding a line break to your tooltip text is to simply make use of a bog standard HTML entity:



Seriously, that was all I needed to force a linebreak in my HTML tooltip. Problem solved, see?

html banner strip

Related Link: jQuery qTip plugin