<html>
<body>
<p>Click the button to change the title of the p element below.</p>
<p id="myP" title="Free Web tutorials">w3schools.com</p>
<button onclick="myFunction()">Try it</button>
<p><strong>Tip:</strong> Hover over the 'w3schools.com' text before and after you click the button.</p>
<script>
function myFunction() {
document.getElementById("myP").title = "The World's Largest Web Development Site";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_element_title2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:02:21 GMT -->
</html>