0

I want to create tooltip in img which is html expression

Example: <img title="<b>My tooltip</b>" src="..."></img>

But what I get is text <b>My tooltip</b> not processed html.

Is some way to do it?

nirmus
  • 4,913
  • 9
  • 31
  • 50
  • Can you please post your code? – Stefan Apr 15 '13 at 08:09
  • 1
    I think, title attribute does not support markups inside. What you can do is create hidden divs which get displayed onMouseOver using some script. – Bimalesh Jha Apr 15 '13 at 08:10
  • 1
    possible duplicate of [Is it possible to format an HTML tooltip?](http://stackoverflow.com/questions/484137/is-it-possible-to-format-an-html-tooltip) – Jukka K. Korpela Apr 15 '13 at 08:12
  • 1
    Yes, you need to create a _custom_ tool-tip. You can't display html in a native tool-tip. See http://stackoverflow.com/questions/7117073/how-to-add-a-tooltip-to-a-div or http://jquerytools.org/demos/tooltip/any-html.html – enhzflep Apr 15 '13 at 08:14
  • my suggestion is use some javascript libraries. – lngs Apr 15 '13 at 08:21

1 Answers1

2

No. It's not possible to format the text in the tooltips with HTML. You'll have to use something like jQuery Tooltip Plugin .

varun1505
  • 800
  • 2
  • 8
  • 16