Is this valid for the Title attribute for the <a> tag for storing html tags, e.g. for a new line

My question here is that it is really valid for the title attribute to store html tags such as break tag for new line.

  <a href="#" title="hello <br> how are you" target="xxx"></a>

If it is valid, then the break tag is displayed in the tooltip of the tool that I want to avoid, but still need a new line.

I am using jQuery.

I referenced the link http://jsfiddle.net/roXon/N8Q2z/ , in which I gave break tags in the header. It just works great in reaching a new line without the break mark displayed in the tooltip.

But not sure which part of the code avoids break tags in the tooltip.

Could you tell me what part of the code in jquery actually avoids breaking tags displayed in tooltips since I am new to jquery.

Would thank for your help !!

Thanks in advance...

+5
source share
4 answers

Try using <br />, but use the values &lt;for <and &gt;for >. This means that when titleplaced in your tooltip, it will be the correct format and its valid!

Tested in IE7 +, Chrome, Firefox.

jsFiddle

<a title="hello&lt;br/&gt;how are you" class="printbtn" href="#">Print results</a><br>
+4
source

Use &#13;or&#xD;

<a href="#" title="hello &#13; how are you" target="xxx"></a>
+2
source

. , , , .

, . , .

+2

text.

title= [CS]; , . title . , "" ( , , ). . , ( ) :

+1

All Articles