This is a simple web-based clock that displays the current time in both analog and digital formats. It is built using HTML, CSS, and JavaScript.
- Analog Clock: A visual representation of the current time with hour, minute, and second hands.
- Digital Clock: A straightforward display of the current time in a digital format.
You can view a live demo here.
To use the clock, simply open the index.html
file in your preferred web browser. The clock will automatically start displaying the current time.
/clock-website
├── index.html
├── styles.css
└── script.js
index.html
: The main HTML file that structures the clock layout.styles.css
: The CSS file that styles the clock and its components.script.js
: The JavaScript file that contains the logic for updating the clock.
- The analog clock is rendered using HTML and styled with CSS.
- JavaScript is used to calculate the current time and position the clock hands accordingly.
- The digital clock updates every second using JavaScript to display the current time in hours, minutes, and seconds.
Feel free to customize the styles in styles.css
to change the appearance of the clock to fit your preferences.
- This project was inspired by the desire to create a simple yet functional clock for web users.