A simple digital clock application built with HTML, CSS, and JavaScript. This project displays the current time with hours, minutes, seconds, and milliseconds, updating every millisecond. It also includes AM/PM formatting.
- Displays current time in
hh:mm:ss:ms AM/PM
format - Updates every millisecond
- Responsive design for different screen sizes
- Simple and clean user interface
You can view a live demo of this project here.
-
Clone the repository:
git clone https://github.com/Muhammadqasim1011/Digital-Clock
-
Navigate to the project directory:
cd digital-clock
-
Open
index.html
in your preferred web browser.
index.html
: The HTML file that contains the structure of the clock.style.css
: The CSS file that styles the clock and the webpage.script.js
: The JavaScript file that controls the clock functionality.
- Open the
index.html
file in a web browser. - The current time will be displayed and updated every millisecond.
- HTML: Provides the structure for the clock, including an
h1
element with the idtime
where the clock is displayed. - CSS: Styles the header, navigation, and the clock display for a clean and responsive design.
- JavaScript: Updates the time displayed on the page every millisecond using the
setInterval
function. It formats the time to include milliseconds and AM/PM.
If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes.
- Push to the new branch.
- Open a pull request with a clear description of your changes.
This project is licensed under the MIT License - see the LICENSE file for details.