How to create a dark/light theme switch using HTML, CSS, and JavaScriptīefore starting the topic, I want to tell you why the dark theme is essential on your website. Hi, I'm Henry Egloff - a multimedia artist, designer, and coder, based in Byron Bay Australia. In the HTML, add the dark mode switch to the top of the page.