Programming Exercises

Design a toggle switch that changes from “On” to “Off” when clicked, using a checkbox and custom CSS.

Hard

Problem Statement

Design a toggle switch that changes from “On” to “Off” when clicked, using a checkbox and custom CSS.

Sample Input

A toggle switch with an on/off state.

Sample Output

The webpage displays a toggle switch that changes state when clicked.

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
<!doctype html> <html></html>
Log in or sign up to run or submit your code.Log inSign up
Input
A toggle switch with an on/off state.
Expected Output
The webpage displays a toggle switch that changes state when clicked.