using css and javascript implement dark mode code example
Example: css dark mode
@media (prefers-color-scheme: dark) {
body {
background-color: black;
color: white;
}
}
@media (prefers-color-scheme: dark) {
body {
background-color: black;
color: white;
}
}