Stopwatch is basically a project that allows you to count a short time. For example, suppose you want to do a task, and count how long it takes you to do it. In that case, this type of stopwatch can be used.
There is no restart button in this Stopwatch. I have already shared a tutorial on Advanced Stopwatch with a restart button. You can watch that tutorial if you want to make an advanced stopwatch.
This HTML Stopwatch is made in a very simple way. There are three small boxes where Time can be seen. It has two control buttons that will start and stop the Stopwatch. Onclick = “” is used between the buttons.
HTML code of Simple Stopwatch
All the information about StopWatch has been added using the following HTML codes. Here first I have created an area that consists of the first three small boxes. There will be a time count in that box. Then there are two buttons that will be used to control the stopwatch.
Now some CSS is needed to design this Stopwatch. The CSS used below is not very difficult. Stopwatch’s background width: 300px, height: 90px and background white color has been used.
The width of the small boxes that will act as displays: 55px. The width of the two buttons here: 140px and height: 50px.