Link: CSS Toggle Switch
The beauty of this CSS toggle switch is that it is accessible when JS/CSS is not available. The following is the HTML it uses.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="switch-toggle switch-candy"> | |
<input id="week" name="view" type="radio" checked> | |
<label for="week" onclick="">Week</label> | |
<input id="month" name="view" type="radio"> | |
<label for="month" onclick="">Month</label> | |
<input id="day" name="view" type="radio"> | |
<label for="day" onclick="">Day</label> | |
<a></a> | |
</div> |
Which works when in HTML-only environment.
IĀ also demonstrated a customized checkbox.