This project allows users to switch between dark mode and light mode using buttons. It dynamically changes the background color of the webpage based on the user's selection.
- Dark Mode: Changes the background color of the webpage to a pleasant aquamarine color.
- Light Mode: Resets the background color to white for a clean and bright interface.
- Basic knowledge of HTML, CSS, and JavaScript.
-
HTML: The HTML contains two buttons:
- A button with the ID
button
for enabling dark mode. - A button with the ID
button1
for enabling light mode.
- A button with the ID
-
JavaScript:
- The JavaScript listens for click events on both buttons.
- When the dark mode button (
button
) is clicked, the background color changes to aquamarine. - When the light mode button (
button1
) is clicked, the background color resets to white.
you can find the demo here