Minimalist Elegance - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Minimalist Elegance</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; background: #f0f0f0; margin: 0; font-family: 'Helvetica Neue', sans-serif; color: #333; } .time-container { text-align: center; padding: 20px; border-radius: 10px; background: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); animation: fadeIn 2s ease-in-out; } .time { font-size: 4em; } .date { font-size: 1.2em; margin-top: 10px; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } </style> </head> <body> <div class="time-container"> <div class="time" id="time">--:--:--</div> <div class="date" id="date">Loading date...</div> </div> <script> function updateTime() { const timeElement = document.getElementById('time'); const dateElement = document.getElementById('date'); const now = new Date(); const hours = now.getHours().toString().padStart(2, '0'); const minutes = now.getMinutes().toString().padStart(2, '0'); const seconds = now.getSeconds().toString().padStart(2, '0'); const day = now.toLocaleString('en-US', { weekday: 'long' }); const month = now.toLocaleString('en-US', { month: 'long' }); const date = now.getDate(); const year = now.getFullYear(); timeElement.textContent = `${hours}:${minutes}:${seconds}`; dateElement.textContent = `${day}, ${month} ${date}, ${year}`; } setInterval(updateTime, 1000); updateTime(); </script> </body> </html>