Display text with a strike-through using CSS

à–¾

To display text with a strike-through using CSS, specify line-through for text-decoration property.

Sample Code [Output]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=shift_jis">
<title>Sample</title>
<style type="text/css"><!--
.importText {
text-decoration:line-through;
}
--></style>
</head>
<body>
<h1>Sample</h1>
<p>
The time is probably not far off when most people earn a salary of <span class="importText">three million yen</span>one million yen a year.
</p>
</body>
</html>