Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

⏰ Digital Clock

A simple and interactive Digital Clock built with HTML, CSS, and JavaScript.
It displays the current time (hours, minutes, seconds) and date (day, month, year) in real-time.

HTML
CSS
JavaScript


📑 Table of Contents


✨ Features

  • Displays real-time digital clock (updates every second)
  • Shows current date (DD/MM/YYYY)
  • Clean and modern gradient background
  • Responsive and lightweight

🛠 How It Works

  1. The script fetches the current system time using JavaScript’s Date() object.
  2. It updates the hours, minutes, seconds, day, month, and year every second.
  3. Leading zeros are added for single-digit numbers (e.g., 09).
  4. The time and date are displayed on the screen in a styled layout.

📂 Project Structure

DigitalClock/
│── DigitalClock.html # Main HTML file
│── DigitalClock.css # Styling
│── DigitalClock.js # Clock logic
│── DigitalClock.png # Demo screenshot
│── README.md # Project documentation


📸 Demo Screenshot

Here is a screenshot of the project running in the browser:

Demo Screenshot


💻 Technologies Used

  • HTML5 → Structure of the clock
  • CSS3 → Styling and gradient background
  • JavaScript (ES6) → Logic for real-time updates

🚀 Installation / How to Run Locally

To run this project locally:

# Clone the repository
git clone https://github.com/your-username/DigitalClock.git 

# Open the project folder
cd DigitalClock  

# Run in your browser
open DigitalClock.html  
# Or simply double-click DigitalClock.html to open it in your browser