Created
August 25, 2025 09:21
-
-
Save svandragt/f75995c55a8a8c1300583f881804d47d to your computer and use it in GitHub Desktop.
TabTime
This file contains hidden or 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>Time</title> | |
<style> | |
body { | |
font-family: sans-serif; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
height: 100vh; | |
font-size: 3rem; | |
} | |
</style> | |
<script> | |
function updateTime() { | |
const now = new Date(); | |
const hours = String(now.getHours()).padStart(2, '0'); | |
const minutes = String(now.getMinutes()).padStart(2, '0'); | |
const timeString = `Time ${hours}:${minutes}`; | |
document.title = timeString; | |
document.getElementById("time-display").textContent = timeString; | |
} | |
window.onload = () => { | |
updateTime(); | |
setInterval(updateTime, 5000); // update every 5 seconds | |
}; | |
</script> | |
</head> | |
<body> | |
<div id="time-display"></div> | |
</body> | |
</html> |
Author
svandragt
commented
Aug 25, 2025

Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment