How to Add a Line Break to a ToolTip Tips, Tricks and Tutorials 15 JUL 2014

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

Related Posts:

About Craig Lotter

Software developer, husband and dad to two little girls. Writer behind An Exploring South African. I don't have time for myself any more.