<!DOCTYPE html>
<html>
<head>
<style>
p#myP {
    text-decoration: underline;
}

</style>
</head>
<body>

<p id="myP">
Hello world!
</p>

<p>Click the "Try it" button to change the text-decoration-line of the paragraph.</p>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
    document.getElementById("myP").style.MozTextDecorationLine = "overline"; // Code for Firefox
    document.getElementById("myP").style.textDecorationLine = "overline";
}
</script>

<p><b>Note:</b> The textDecorationLine property is not supported in any of the major browsers.</p>
<p><b>Note:</b> Firefox supports an alternative, the MozTextDecorationLine property.</p>

</body>
</html>