HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> p:nth-child(2){ font-size:20px; text-decoration-line: underline; text-decoration-style: wavy; } </style> </head> <body> <h1>CSS text-decoration-color Property</h1> <p>This is a sentence</p> <button onclick="myFunction()">Click Me</button> <script> var x = document.getElementsByTagName("p")[0]; function myFunction(){ x.style.textDecorationColor = "red"; } </script> <p><strong>Note</strong>: click on the button to change the 'text-decoration-color' from black to red.</p> </body> </html>
OUTPUT
×

Save as Private