Modern web-based digital clock built with HTML, CSS, and vanilla JavaScript
📸 Screenshots :
🕐 Features
- Real-time Updates - Clock updates every second with precise timing
- Dark Theme - Terminal-inspired design with dark background and green digital display
- Format Toggle - Switch between 12-hour and 24-hour time formats
- Date Display - Shows current date in full format (Day, Month Date, Year)
- Responsive Design - Works perfectly on desktop, tablet, and mobile devices
- Clean Interface - Minimalist design focusing on readability
- No Dependencies - Built with vanilla JavaScript, no external libraries required
🚀 Demo
Open index.html in your browser to see the clock in action!
📁 Project Structure
Terminal-Clock/
├── index.html # Main HTML structure
├── style.css # Dark theme styling
├── script.js # Clock functionality
└── README.md # Project documentation
🛠️ Installation & Usage
- Clone or download this repository
git clone https://github.com/JwelSrivastava/Terminal-Clock.git- Navigate to the project folder
cd Terminal-Clock- Open
index.htmlin your web browser - Enjoy your digital clock!
- Open the project in VS Code
- Install Live Server extension
- Right-click on
index.htmland select "Open with Live Server"
🎨 Customization
Edit the CSS variables in style.css:
.digital-clock {
color: #00ff88; /* Change this for different clock color */
}
body {
background-color: #1a1a1a; /* Change background color */
}Edit the updateClock() function in script.js to customize time display format.
🌟 Key Components
- Simple, semantic HTML5 structure
- Responsive viewport meta tag
- Clean, accessible markup
- Modern dark theme design
- Flexbox centering layout
- CSS transitions for smooth interactions
- Mobile-responsive breakpoints
Date()object for accurate timesetInterval()for real-time updates- Format switching logic
- DOM manipulation for updates
- ✅ Chrome (Latest)
- ✅ Firefox (Latest)
- ✅ Safari (Latest)
- ✅ Edge (Latest)
- ✅ Mobile browsers
🤝 Contributing
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Multiple timezone support
- Alarm functionality
- Customizable themes
- Sound effects
- Stopwatch/Timer features
- Weather integration
This project is open source and available under the MIT License.
JwelSrivastava
- GitHub: @JwelSrivastava
⭐ If you found this project helpful, please consider giving it a star!
Made with ❤️ by Jwel Srivastava | Syntax Surfer.