HTML Element Style How to - Clear line-through for an element in a table row








Question

We would like to know how to clear line-through for an element in a table row.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.table-item td span {<!--from w  w w.jav a  2 s  .c  o  m-->
  text-decoration: line-through;
}

.table-item a {
  text-decoration: none !important;
}
</style>
</head>
<body>
  <table>
    <tr class="table-item">
      <td><span>Text</span></td>
      <td><a href="#">Delete item</a></td>
    </tr>
  </table>
</body>
</html>

The code above is rendered as follows: