How to Add a Line Break to a Tooltip
by
Doug
Updated June 1, 2018
It's possible to add line breaks to a HTML ToolTip tag. To add the line break simply use either the entity or in some cases the \n escaped newline character will work.
In a regular HTML page the ToolTip title tag would look like the following when creating a line break:
-----------------------------------------------
title="First: We will break the line here Second: then continue on this line."
-----------------------------------------------
In ASP.NET, the tooltip line break uses \n and would look like this:
-----------------------------------------------
ToolTip="First: We will break the line here \n Second: then continue on this line."
-----------------------------------------------
I have only tested this in Internet Explorer 7, so you will want to test this out in Firefox and Safari as well. To test Hover Over This.
Keep in mind there may be a limit to the number of characters you can have in a Tooltip.