<html>
<head>
<style>
p#demo {
text-decoration: underline;
}
</style>
</head>
<body>
<p id="demo">
Hello world!
</p>
<p>Click the "Try it" button to change the color of the underline.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
document.getElementById("demo").style.textDecorationColor = "red";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_textdecorationcolor by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 17:39:53 GMT -->
</html>