Skip to content

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

Notifications You must be signed in to change notification settings

Muhammadqasim1011/Digital-Clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation


Digital Clock

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.

Features

  • 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

Demo

You can view a live demo of this project here.

Installation

  1. Clone the repository:

    git clone https://github.com/Muhammadqasim1011/Digital-Clock
  2. Navigate to the project directory:

    cd digital-clock
  3. Open index.html in your preferred web browser.

Files

  • 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.

Usage

  1. Open the index.html file in a web browser.
  2. The current time will be displayed and updated every millisecond.

Code Explanation

  • HTML: Provides the structure for the clock, including an h1 element with the id time 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.

Contributing

If you would like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Commit your changes.
  4. Push to the new branch.
  5. Open a pull request with a clear description of your changes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements


About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published