<html>
<body>
<p>Click the button to create a U element with some text.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
var x = document.createElement("U");
var t = document.createTextNode("This text is underlined");
x.appendChild(t);
document.body.appendChild(x);
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_u_create by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 14:23:33 GMT -->
</html>