टेक्स्ट डेकोरेशन की शैली सेट करने के लिए, टेक्स्ट-डेकोरेशन-स्टाइल प्रॉपर्टी का उपयोग करें। आप निम्न मानों का उपयोग कर सकते हैं -
text-decoration-style: solid|double|dotted|dashed|wavy|initial|inherit;
उदाहरण
<!DOCTYPE html>
<html>
<head>
<style>
span {
text-decoration: line-through;
text-decoration-color: blue;
}
.demo2 {
text-decoration: underline;
text-decoration-style: double;
text-decoration-color: red;
}
</style>
</head>
<body>
<h1>Details</h1>
<p class="demo">Examination Center near <span>XYZ College</span> ABC College.</p>
<p class="demo2">Exam begins at 11AM.</p>
</body>
</html> आउटपुट

उदाहरण
आइए अब एक और उदाहरण देखें -
<!DOCTYPE html>
<html>
<head>
<style>
.demo {
text-decoration: overline;
text-decoration-color: blue;
text-decoration-style: wavy;
}
.demo2 {
text-decoration: overline;
text-decoration-style: dashed;
text-decoration-color: red;
}
</style>
</head>
<body>
<h1>Details</h1>
<p class="demo">Examination Center near ABC College.</p>
<p class="demo2">Exam begins at 11AM.</p>
</body>
</html> आउटपुट
