Page Widget How to - overstrike text without del element








Question

We would like to know how to overstrike text without del element.

Answer


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.11.0.js'></script>
<style type='text/css'>
.sliced-text {<!--  ww  w  .  ja  v a 2 s . co m-->
  font-size: 11px;
  text-decoration: line-through;
}
</style>
</head>
<body>
  <p class="sliced-text">My text here</p>
  <p>My text here</p>
</body>
</html>

The code above is rendered as follows: