टेक्स्ट सजावट (अंडरलाइन, ओवरलाइन, लाइन-थ्रू) का रंग सेट करने के लिए text-decoration-color प्रॉपर्टी का उपयोग करें। यह text-decoration-line और text-decoration-style से स्वतंत्र रूप से रंग नियंत्रित करता है।
उदाहरण
<!DOCTYPE html> <html>
<head>
<style>
.demo {
text-decoration: overline;
text-decoration-color: yellow;
}
</style>
</head>
<body>
<h1>परीक्षा विवरण</h1>
<p class="demo">परीक्षा 20 दिसंबर को।</p>
<p class="demo2">परीक्षा सुबह 9 बजे शुरू होती है।</p>
</body>
</html>
आउटपुट

एक और उदाहरण
<!DOCTYPE html> <html>
<head>
<style>
.demo {
text-decoration: underline;
text-decoration-color: orange;
}
</style>
</head>
<body>
<h1>विवरण</h1>
<p class="demo">परीक्षा केंद्र ABC कॉलेज के पास।</p>
<p class="demo2">परीक्षा सुबह 9 बजे शुरू होती है।</p>
</body>
</html>
आउटपुट

नोट: text-decoration शॉर्टहैंड text-decoration-line, text-decoration-color, text-decoration-style, text-decoration-thickness को एक साथ सेट करता है।