Skip to content

golu19102003/Digital-Clock-Watch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

image

Digital-Clock-Watch

⏰ Web Clock Watch A simple and responsive digital clock built using HTML, CSS, and JavaScript. This project displays the current time in hours, minutes, and seconds, updating in real time. It is ideal for beginners learning DOM manipulation, styling, and basic JavaScript functions.

πŸ“Œ Features:

⏱️ Real-time digital clock

🎨 Clean and minimal UI

πŸ“± Fully responsive design

⚑ Uses basic JavaScript without any external libraries

πŸŒ™ Easy to customize (colors, fonts, layout)

πŸ“ Project Structure:

web-clock/; │── index.html # Main HTML structure │── style.css # Clock styling └── script.js # Logic for real-time clock updates

πŸš€ How It Works:

HTML defines the layout for displaying the time.

CSS adds styling for alignment, fonts, and visual design.

JavaScript uses setInterval() to:

Get the current system time

Format hours, minutes, and seconds

Update the clock display every second

▢️ How to Run the Project:

Download or clone the project folder

Open index.html in any modern web browser

The clock will start running automatically

🧩 Sample Code index.html

<title>Web Clock</title>
<script src="script.js"></script>

style.css body { display: flex; justify-content: center; align-items: center; height: 100vh; background: #000; margin: 0; font-family: Arial, sans-serif; }

#clock { color: #00ff99; font-size: 70px; letter-spacing: 3px; }

script.js function updateClock() { const now = new Date(); const time = now.toLocaleTimeString(); document.getElementById("clock").textContent = time; }

setInterval(updateClock, 1000); updateClock();

About

A simple and responsive digital clock built using HTML, CSS, and JavaScript. This project displays the current time in hours, minutes, and seconds, updating in real time. It is ideal for beginners learning DOM manipulation, styling, and basic JavaScript functions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors