Created
April 16, 2024 20:04
-
-
Save mshuffett/5ebf9e95e6e796d753e1dcccb694b473 to your computer and use it in GitHub Desktop.
Plain Clock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Clock</title> | |
<style> | |
body { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
height: 100vh; | |
margin: 0; | |
background-color: #282c34; | |
color: white; | |
font-family: Arial, sans-serif; | |
font-size: 48px; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="clock"></div> | |
<script> | |
function updateTime() { | |
const now = new Date(); | |
document.getElementById('clock').textContent = now.toLocaleTimeString(); | |
} | |
setInterval(updateTime, 1000); | |
updateTime(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment