SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: Strikethrough

  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Strikethrough

    Is it possible to apply a strikethrough to text using CSS?

    If so, is it considered bad practice to do so?

    Are there any supportability issue?

    Thanks,



    Debbie

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,214
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    <s> and <strike> are deprecated element, but they work better than the CSS alternative, line-through.

  3. #3
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    <s> and <strike> are deprecated element, but they work better than the CSS alternative, line-through.
    Because...



    Debbie

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,214
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    Because...
    of browser support. (The linked pages list browser support.)

  5. #5
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    of browser support. (The linked pages list browser support.)
    But if <strike> is deprecated as well, doesn't using that HTML tag create the same issue?


    Either way, is it "bad form" to strike-through text online (similat to how many frown upon underlining non-hyperlinked text)?


    Debbie

  6. #6
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Uhm... Surprised I don't see the CORRECT tag for this mentioned.

    See, sure <s> and <strike> are deprecated -- IN FAVOR OF <del>

    So use DEL. "deleted text" -- renders properly in all browsers, just don't expect the attributes to do anything.

    That's one problem with the sitepoint reference -- on the deprecated tags it often fails to list what they were deprecated in favor of... though it is at least mentioned in "additional reading"

    Which is part of why I still use the decade old WDG HTML reference -- it's still the best one out there.
    http://htmlhelp.com/reference/html40/

    See it's entries for S and Strike.
    http://htmlhelp.com/reference/html40/fontstyle/s.html
    http://htmlhelp.com/reference/html40...le/strike.html

    Both of which talk about using DEL -- though for comedy they suggest using both DEL and S. This is the site showing it's age since Nyetscape 4 didn't support DEL while IE5 did.

  7. #7
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,806
    Mentioned
    34 Post(s)
    Tagged
    2 Thread(s)
    CSS support can at times be spotty. however, AFIK, "text-decoration:line-trough" only has minor bugs.
    Internet Explorer for Windows versions up to and including 6 place the line-through line noticeably higher above the baseline than other browsers.
    <strike> and <s> may still be supported tho. much the same way <font> is deprecated, but you can still use it.

    As usual, that you can still use it doesn't mean you should. Tags convey semantic meaning. Usually a strike through mean information that was deleted ( in fact there is a <del> tag, and <ins>)

  8. #8
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by deathshadow60 View Post
    Uhm... Surprised I don't see the CORRECT tag for this mentioned.

    See, sure <s> and <strike> are deprecated -- IN FAVOR OF <del>
    You're a wealth of knowledge!

    Thanks,



    Debbie


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
  •