When the screen is not touched by a user for a long period of time, it could be switched off, depending on the current system settings. Of course, such a situation may be unacceptable in some scenarios, thus it is beneficial to learn how to disable it. You will learn how to do it in this recipe.
As an example, you will prepare a page with the Toggle switching off button. After pressing it, the mechanism of switching off the screen will be disabled or enabled. To simplify your understanding of the current state, the background of the page will be changed to yellow when the mechanism of switching off the screen is disabled.