<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Button Alert Example</title>
</head>
<body>

    <button id="alertButton">Click Me!</button>

    <script>
        // Get the button element by its ID
        var button = document.getElementById('alertButton');

        // Bind a click event listener to the button
        button.addEventListener('click', function() {
            // Show an alert when the button is clicked
            alert('Button clicked!');
        });
    </script>

</body>
</html>