This project is a simple digital clock built using HTML, CSS, and JavaScript. The clock displays hours, minutes, seconds, and milliseconds, along with the AM/PM session indicator.
index.html
- The main structure of the clock.style.css
- Stylesheet for the clock’s design.script.js
- JavaScript logic to update the clock in real-time.
- Displays the current time with hours, minutes, seconds, and milliseconds.
- Updates in real-time.
- Shows AM/PM format.
- Simple and clean UI.
- Download or clone the project.
- Open
index.html
in a browser. - The clock will start displaying the current time automatically.
- Modify
style.css
to change the appearance of the clock. - Update
script.js
to add additional features like a 24-hour format or different time zones.
<div class="container">
<span id="hours">00</span>
<span>:</span>
<span id="minutes">00</span>
<span>:</span>
<span id="seconds">00</span>
<span>:</span>
<span id="miliseconds">00</span>
<span id="session">AM</span>
</div>
This project is free to use and modify as needed.