Skip to content

abderrahim1210/clock-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ•’ Clock Project – 07-clock-dom.html

This simple project demonstrates how to build a real-time digital clock using HTML, CSS, and JavaScript (DOM manipulation). The clock updates every second and displays the current time in HH:MM:SS format.

====================
πŸ“ File Structure
====================
07-clock-dom.html     ← Main file containing HTML, CSS, and JS
README.txt            ← This file

====================
πŸš€ How It Works
====================
- The HTML file includes a container element for the clock.
- JavaScript is used to:
  - Get the current time using Date()
  - Format hours, minutes, and seconds with leading zeros
  - Update the content of the clock element every second using setInterval()
- Basic CSS is included to center the clock and style it cleanly.

====================
πŸ”§ Technologies Used
====================
- HTML5
- CSS3
- JavaScript (DOM)

====================
πŸ“¦ How to Use
====================
1. Download or clone the repository.
2. Open 07-clock-dom.html in your browser.
3. Watch the live digital clock update in real-time.

====================
πŸ“Œ Notes
====================
- No external libraries or frameworks are used.
- This project is a great beginner-friendly example of working with the DOM and intervals in JavaScript.

====================
πŸ’‘ Author
====================
Abderrahim Khali Ali