
Native toggle switch button with fallback using HTML and CSS only
You can create a native toggle switch button using only HTML and CSS by using a checkbox input and styling it accordingly.
However, there is also a way to use the switch
attribute that turns the native checkbox into the switch button.