Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 265951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:48:50+00:00 2026-05-11T22:48:50+00:00

The HTML elements del , strike , or s may all be used for

  • 0

The HTML elements del, strike, or s may all be used for a text strike-through effect. Examples:

<del>del</del>

….gives: del

<strike>strike</strike> and <s>strike</s>

….gives: strike and strike

The CSS text-decoration property with a value line-through may be used similarly. The code…

<span style='text-decoration:line-through'>
    text-decoration:line-through
</span>

…will also render to look like: text-decoration:line-through

However, the strikethrough line is typically the same color as the text.

Can CSS be used to make the line a different color?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T22:48:51+00:00Added an answer on May 11, 2026 at 10:48 pm

    Yes, by adding an extra wrapping element. Assign the desired line-through color to an outer element, then the desired text color to the inner element. For example:

    <span style='color:red;text-decoration:line-through'>
      <span style='color:black'>black with red strikethrough</span>
    </span>

    …or…

    <strike style='color:red'>
      <span style='color:black'>black with red strikethrough<span>
    </strike>

    (Note, however, that <strike> is considered deprecated in HTML4 and obsolete in HTML5 (see also W3.org). The recommended approach is to use <del> if a true meaning of deletion is intended, or otherwise to use an <s> element or style with text-decoration CSS as in the first example here.)

    To make the strikethrough appear for a:hover, an explicit stylesheet (declared or referenced in <HEAD>) must be used. (The :hover pseudo-class can’t be applied with inline STYLE attributes.) For example:

    <head>
      <style>
        a.redStrikeHover:hover {
          color:red;
          text-decoration:line-through;
        }
      </style>
    </head>
    <body>
      <a href='#' class='redStrikeHover'>
        <span style='color:black'>hover me</span>
      </a>
    </body>

    (IE7 seems to require some href be set on the <a> before :hover has an effect; FF and WebKit-based browsers do not.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 119k
  • Answers 119k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer To clarify: you are referring to the args argument you… May 11, 2026 at 11:55 pm
  • Editorial Team
    Editorial Team added an answer Use INTERSECT operator. It's NULL-sensitive and efficient if you have… May 11, 2026 at 11:55 pm
  • Editorial Team
    Editorial Team added an answer You will need to add an integer field that stores… May 11, 2026 at 11:55 pm

Related Questions

I am developing a website using forms and one of the browsers being targeted
I have two functions to add and remove table rows that contain a form
given this html code: <td><img class='del' id='4' src='images/delete.gif'></td> I am in trouble understanding how
I am trying to create a dialog box that will appear only if the
I know that I should put all the html elements in body tag, but

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.