DEV Community

Cover image for Change Color of Div onclick - HTML, CSS, JS

Posted on • Updated on

Change Color of Div onclick - HTML, CSS, JS

Change Color of Div onclick is a JS code made with HTML, CSS and JavaScript. They are usually used to change color of a Div on a single click. When your site's color changes with a click, it gives your site a professional look and you can also announce something inside this Div.
View it on our website

At first, on our webpage, there is our Div change color onclick. When you click on view code after visiting our website the whole code will appear, there is a also a button to copy the codes (HTML, CSS and JS).

You can view and copy the source code files through the link given below. View and Copy Source Code

Discussion (2)

lesha profile image
lesha 🟨⬛️


web_dev profile image
Web_Codr Author

yes, you can try on my website