<html>
<body>
<h1>JavaScript console.clear() Method</h1>
<p>Press F12 on your keyboard to view the message in the console view.</p>
<p>Click the button to clear the console:</p>
<button onclick="myFunction()">Clear Console</button>
<script>
console.log("Hello! Press the button to clear the console!");
function myFunction() {
console.clear();
}
</script>
</body>
</html>