Welcome to the Stopwatch project! This is a straightforward yet fully functional web-based stopwatch application that showcases basic web development skills. Built with HTML, CSS, and JavaScript, the application provides a user-friendly interface for tracking time, recording laps, and resetting the stopwatch. Whether you're looking to track your workout times, manage cooking durations, or simply explore web development techniques, this stopwatch project offers a practical example of how to create interactive web applications.
- Start/Stop Button: Toggle between starting and stopping the stopwatch.
- Reset Button: Reset the stopwatch to
00:00:00
. - Lap Button: Record lap times, with a maximum of 10 laps.
- Lap Times Display: List recorded lap times with timestamps.
index.html
: The main HTML file for the stopwatch application.styles.css
: Contains the CSS styling for the stopwatch.script.js
: Includes the JavaScript code for stopwatch functionality.
Open index.html
in a Web Browser to view and interact with the stopwatch.
- HTML: Provides the structure of the stopwatch interface, including the display, buttons, and lap list.
- CSS: Styles the stopwatch with a dark theme, centered content, and responsive design.
- JavaScript: Manages stopwatch operations such as start/stop, reset, and lap recording. It also updates the display with the elapsed time.
The HTML file defines the layout for the stopwatch, including:
- A
display
area for showing elapsed time. - Buttons for starting/stopping, resetting, and recording laps.
- A
lapsList
to display recorded lap times.
The styles.css
file applies the following styles:
- A dark background for the body and stopwatch container.
- Centered content and a modern, clean look.
- Button styles with hover effects for better user interaction.
The script.js
file includes:
formatTime(ms)
: Converts milliseconds toMM:SS:MS
format.updateDisplay(time)
: Updates the stopwatch display.startStop()
: Starts or stops the stopwatch based on the current state.reset()
: Resets the stopwatch and clears lap times.addLap()
: Adds a lap time to the list with a maximum of 10 laps.
-
Fork the Repository.
-
Create a New Branch:
git checkout -b feature/your-feature
-
Make Your Changes.
-
Commit Your Changes:
git add . git commit -m "Add your message here"
-
Push to the Branch:
git push origin feature/your-feature
-
Open a Pull Request.
]
- HTML, CSS, and JavaScript for creating the stopwatch application.
- Inspiration from various stopwatch implementations and UI/UX design principles.