Mawg
Mawg

Reputation: 40140

Can I embedded HTML tags in an HREF's TITLE? (I need some sort of line break)

It seems not,as they are showing up as cleartext.

I am trying to format a rather large tootlip by inserting <p> and <br>, but, as I say, Chrome treats them as text.

What am I allowed to put into such a tooltip? Anything other than a single string?

Since \n seems to be ignored, is there any way to get a line break into such a string?

Upvotes: 0

Views: 43

Answers (2)

cakan
cakan

Reputation: 2117

You can add symbol for a new line: &#013; (\r) or &#010; (\n) to your title.

<a href="" title="first row&#013;second row&#010;third row">test</a>

Another option is to find some JavaScript tooltip library.

Upvotes: 2

casraf
casraf

Reputation: 21684

If you feed them actual line breaks, they will work.

<span title="Two
Liner">Hover here</span>

However, if you need more complex HTML inside, I'd suggest qTip or Bootstrap's tooltips

Upvotes: 1

Related Questions