Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2003
    Location
    USA
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do you do a strikethrough tag?

    how do you do a cross-out or strikethrough in HTML? like so that the text has a line through it?
    ~KGP

  • #2
    New Coder
    Join Date
    Feb 2004
    Location
    California
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Using CSS you could do it like:
    Code:
    p.lined {
        text-decoration:line-through;
    }
    And use it like:

    Code:
    <p class="lined">This text has a line through it.</p>
    <p>This doesn't</p>

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Sheffield, UK
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the <s> tag will do it actually. It's an inline tag so use it in the same way was <b> or <i>

    EDIT: It's been depreciated as of the latest browser specs, so i would do something similar to the posta above, except using an inline tag instead of <p> :

    Code:
    <style type="text/css">
    .strike {
    text-decoration: line-through;
    }
    </style>
    
    <p><span class="strike">Striken out</span> normal text.</p>
    Last edited by ReadMe.txt; 03-03-2004 at 03:00 PM.
    "To be successful in IT you don't need to know everything - just where to find it in under 30 seconds"

    (Me Me Me Me Me Me Me Me Me)


  •  

    Posting Permissions

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