How do you create a dark mode that works across the whole website?

Im try to create a website that has a dark mode. When i try to google it, i get JavaScript methods that work but undoes itself on refresh and when moving on to another page. I would like something like YouTubes dark mode. And is it possible to make it work without the user having to have an account? Any info would be appreciated.

1 Answer

Still have questions? Get your answers by asking now.