How to make dark mode in HTML,CSS,JS ? | SoloLearn: Learn to code for FREE!


How to make dark mode in HTML,CSS,JS ?

pls help broh.

7/21/2019 5:23:09 AM

Daniel Fikri

6 Answers

New Answer


Create a js function where you change the background color of the elements you want to a darker color, and add the current settings of the light mode.(by using an if else statement) Create an html button , add an click event on it, and by pressing it you should be switching between light/dark mode. If you have any other questions feel free to show us your code, and sololearn users will do their best to help you. 😀


Do you mean the SoloLearn application or your code editor?


Something like this, and you can stylish, add more advanced stuffs, etc...



The Website appearance