
As you know, the
HTML 4.01 specification
requires that the string attributes
(LF) in the string attributes (CDATA) are ignored, and the
carriage return (CR) characters be replaced with spaces.
But in the HTML5 specification, on the contrary,
line feed (LF) characters
in the title attribute are considered significant . It is assumed that you can dial a code like the following:
<a href="…" title=" . .">…</a>
and expect a two-line tooltip to appear when you hover over a hyperlink.
By the way, I typed " & # 10; ”- but Habrahabr replaced this code with a real line feed. At least in my firefox. Such is the bug of habrateg <source> . However, according to HTML5, both of these forms of line feed are significant. Both the symbol itself and its entity.
Internet Explorer did just that all the way and behaved (at least for the last
six years) - I wanted
to spit
on HTML 4.01, displayed a multi-line hint. It is appropriate to think that it was MSIE's behavior that was the source of inspiration for the authors of the corresponding HTML5 subsection.
')
A few days ago (January 25), this problem
( bug 358452 ) was solved in Firefox.
Apparently, Firefox 12 will be the first version of Firefox with multi-line tooltips.
→ The design used a photo of the Enter key, by ReillyButler , license CC BY-SA 2.0 .