<html>
<head>
<title>HTML DOM Objects</title>
</head>
<body>
<p>Click the button to change the text of the document's title.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementsByTagName("TITLE")[0].text = "A new title text..";
document.getElementById("demo").innerHTML = "The text of the document's title was changed from 'HTML DOM Objects' to 'A new title text..'.";
}
</script>
</body>
</html>