<!DOCTYPE html>

<html>

<head>

    <title>Current Date and Time</title>

    <style>

        /* Add some basic styling to center the date and time */

        body {

            display: flex;

            justify-content: center;

            align-items: center;

            height: 100vh;

            font-family: Arial, sans-serif;

            font-size: 24px;

        }

    </style>

</head>

<body>

    <div id="datetime"></div>


    <script>

        // JavaScript code to update the date and time

        function updateDateTime() {

            var dateTimeElement = document.getElementById('datetime');

            var currentDate = new Date();

            dateTimeElement.innerHTML = currentDate;

        }


        // Update the date and time initially and then every second

        updateDateTime();

        setInterval(updateDateTime, 1000);

    </script>

</body>

</html>