How to decorate text with CSS: underline, overline, line-through, none
The below HTML and CSS code example shows you how to specify the line-height of a paragraph with CSS.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>this is the title of the web page</title>
<style type="text/css">
</style>
</head>
<body>
<p>
<span style="text-decoration: underline;">
This text has a text-decoration attribute with a value of"underline".
</span>
</p>
<p>
<span style="text-decoration: overline;">
This text has a text-decoration attribute with a value of "overline".
</span>
</p>
<p>
<span style="text-decoration: line-through;">
This text has a text-decoration attribute with a value of "line-through".
</span>
</p>
<p>
<span style="text-decoration: none;">
This text has a text-decoration attribute with a value of "none".
</span>
</p>
</body>
</html>
The above HTML and CSS code makes the paragraphs below.
This text has a text-decoration attribute with a value of"underline".
This text has a text-decoration attribute with a value of "overline".
This text has a text-decoration attribute with a value of "line-through".
This text has a text-decoration attribute with a value of "none".
Use the text editor below to practice decorating text with CSS.