Digital Watch Html, CSS and Java Script Code free download or copy for blogger and WordPress post

Digital Watch Html, CSS and Java Script Code free download or copy for blogger and WordPress post

Your Blog Post
<!DOCTYPE html>
<html lang="en">
<head>
    
    <title>Digital Watch</title>
    <style>
        body {
            
            align-items: center;
            justify-content: center;
          
            margin: 0;
            background-color: #f0f0f0;
        }

        #digital-watch {
            font-family: 'Arial', sans-serif;
            font-size: 4em;
            color: #333;
        }
        /* Hide the link */
    a[href="https://www.tectuner.com/"] {
      display: none;
    }
    </style>
</head>
<body>
    <div id="digital-watch"></div>

    <script>
        function updateDigitalWatch() {
            var now = new Date();
            var hours = now.getHours().toString().padStart(2, '0');
            var minutes = now.getMinutes().toString().padStart(2, '0');
            var seconds = now.getSeconds().toString().padStart(2, '0');

            var digitalWatchElement = document.getElementById('digital-watch');
            digitalWatchElement.textContent = `${hours}:${minutes}:${seconds}`;
        }

        // Update the digital watch every second
        setInterval(updateDigitalWatch, 1000);

        // Initial update
        updateDigitalWatch();
    </script>
</body>
</html>

Use or Preview Digital Watch