SitePoint Sponsor

User Tag List

Results 1 to 12 of 12

Thread: abbr title

  1. #1
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    abbr title

    Hi!

    When I put a 'space' in <abbr title> (used for tooltip), it is not renedered. It just renders the text (which is before the 'space'). So the tooltip for the foloowing is rendered as ('Short)

    <td rv="SS" class='text '><abbr title=Short Sale><font color ='black'>SS</abbr></td>.

    However, when I take out the space
    <td rv="SS" class='text '><abbr title=ShortSale><font color ='black'>SS</abbr></td>

    the tooltip is rendered as 'ShortSale'.
    But, I do want a space i.e. (it should display 'short sale'). Help!!

  2. #2
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,420
    Mentioned
    273 Post(s)
    Tagged
    5 Thread(s)
    Shouldn't your text be quoted? i.e.
    Code:
    <abbr title="Short Sale">

  3. #3
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    It is STRONGLY recommend you put attribute values in quotes in HTML 4.01, although the formal rules allow the omission of the quotes in some 'rare cases'. In XML and XHTML quotes are always required.

    Quote Originally Posted by http://www.w3.org/TR/REC-html40/intro/sgmltut.html#h-3.2.2
    In certain cases, authors may specify the value of an attribute without any quotation marks. The attribute value may only contain letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons (ASCII decimal 58). We recommend using quotation marks even when it is possible to eliminate them.
    Therefore within HTML 4.01 <br title=FrobozzMagic> would be CORRECT but <br title=Frobozz Magic> INCORRECT obviously within XHTML you MUST quote the attribute value. In other words always use: <abbr title="Short Sale">...</abbr> which is the best and safest way.

    Even when not in doubt, quote anyway!

  4. #4
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    I hate abbr, because it leaves keyboard-users in the dark.

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    I hate abbr, because it leaves keyboard-users in the dark.
    Presumably that will change as devices catch up, though?

  6. #6
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks all. Encapsulating it with "" worked.

  7. #7
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by ralph
    Presumably that will change as devices catch up, though?
    They had over 10 years to catch up. I'm not optimistic.

  8. #8
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    They had over 10 years to catch up. I'm not optimistic.
    But with HTML5 reinvigorating it and all ...

  9. #9
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    http://html5doctor.com/the-abbr-element/ doesn't seem very invigorated. Still doesn't add any value with keyboard. Doesn't do anything different, doesn't mean anything different, and still broken in IE7. We could add abbr with Javascript before HTML5.

  10. #10
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    doesn't seem very invigorated.
    Well, I really meant the fact that <acronymn> has been dropped in the new version of HTML in favor of this one might prod device makers into accepting that abbr needs to be taken more seriously. I prefer <abbr> purely because it seems more accurate to me (grammatically speaking).

  11. #11
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Meh, and they added embed. So those who've always used embed, will blindly continue using embed except now it's legal (if they cared, they wouldn't have used it in the first place), while the rest of us who never used embed will continue not to do so. I assume the same for abbr (who still isn't in any vendor's plan to get some keyboard love). Plus, it doesn't seem anyone is paying much attention to old tags under the "HTML5" banner anyways. Only the shiny new ones. And then they don't know how to use them most of the time.

    Doesn't matter anyway. You can have a million Zeldmans exhorting semantics, and 99% of developers will say "whatever dude" and write something else anyway. Because nobody cares. HTML semantics is for weenies, just make it shiny with 300kb of Javascript and you'll get paid too much money.

  12. #12
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    And then they don't know how to use them most of the time.
    Yes, and it doesn't look like that's going to get any better.

    Off Topic:

    You can have a million Zeldmans ...
    Zeldmen?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •