<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JavaScript place on head tag</title>
<script type="text/javascript">
function user_fun() {
document.getElementById('text').innerHTML = 'Hello World!';
}
</script>
</head>
<body>
<p id="text">Click to change Text Message....:)</p>
<button type="button"
onclick="user_fun();">Change Text</button>
</body>
</html>