टेक्स्ट-डेकॉरेशन में लाइन का प्रकार सेट करने के लिए, textDecorationLine प्रॉपर्टी का उपयोग करें। जावास्क्रिप्ट के साथ टेक्स्ट-डेकॉरेशन में लाइन का प्रकार वापस करने के लिए निम्न कोड चलाकर देखें:
उदाहरण
<!DOCTYPE html> <html> <body> <div id = "myText" style = "text-decoration: underline;"> यह डेमो टेक्स्ट है। </div> <br> <button onclick="display()"> टेक्स्ट डेकॉरेशन सेट करें </button> <script> function display() { document.getElementById("myText").style.textDecorationColor = "red"; document.getElementById("myText").style.textDecorationLine = "overline"; } </script> </body> </html>