The humble radio button
<script src="jquery.js"></script> <script type="text/javascript"> $('li:first').addClass('first'); </script>
<form method="" action=""> <fieldset> <legend>Radio Buttons are:</legend> <ul> <li> <input id="rbb1" type="radio" name="buttons" value="accessible"> <label for="rbb1">by default accessible</label> </li> <li> <input id="rbb2" type="radio" name="buttons" value="useful"> <label for="rbb2">super useful</label> </li> <li> <input id="rbb3" type="radio" name="buttons" value="navigable"> <label for="rbb3">natively navigable</label> </li> <li> <input id="rbb4" type="radio" name="buttons" value="supported"> <label for="rbb4">supported in all browsers</label> </li> <li> <input id="rbb5" type="radio" name="buttons" value="semantic"> <label for="rbb5">semantic</label> </li> <li> <input id="rbb6" type="radio" name="buttons" value="simple"> <label for="rbb6">easy to implement</label> </li> <li> <input id="rbb7" type="radio" name="buttons" value="all"> <label for="rbb7">All of the above</label> </li> </ul> </fieldset> <input type="submit" value="Submit"> </form>*dont worry if you can read this yet.
<form method="" action=""> </form>
<form method="POST" action="#formid"> </form>
overridden by formmethod and formaction attributes on <button>, <input type="submit">, or <input type="image">
Other attributes include: accept, accept-charset, autocomplete, enctype, name, novalidate, and target<form method="POST" action="#formid"> <fieldset> </fieldset> </form>
<form method="POST" action="#formid"> <fieldset> </fieldset> </form>
<form method="POST" action="#formid"> <fieldset> <legend></legend> </fieldset> <input type="submit" value="Submit"> </form>
<form method="POST" action="#formid"> <fieldset> <legend>Radio Buttons are:</legend> </fieldset> <input type="submit" value="Submit"> </form>
<form method="POST" action="#formid"> <fieldset> <legend>Radio Buttons are:</legend> </fieldset> <input type="submit" value="Submit"> </form>
<form method="POST" action="#formid"> <fieldset> <legend>Radio Buttons are:</legend> <ul> <li> <input id="rbb1" type="radio" name="buttons" value="accessible"> </li> <li> <input id="rbb2" type="radio" name="buttons" value="useful"> </li> <li> <input id="rbb3" type="radio" name="buttons" value="navigable"> </li> </ul> </fieldset> <input type="submit" value="Submit"> </form>
<input id="rbb1" type="radio" name="buttons" value="accessible"> <input id="rbb2" type="radio" name="buttons" value="useful"> <input id="rbb3" type="radio" name="buttons" value="navigable">
<input id="rbb2" type="radio" name="buttons" value="useful"> <input id="rbb3" type="radio" name="buttons" value="navigable">
<form method="POST" action="http://x.y"> <fieldset> <legend>Radio Buttons are:</legend> <ul> <li> <input id="rbb1" type="radio" name="buttons" value="accessible"> <label for="rbb1">by default accessible</label> </li> <li> <input id="rbb2" type="radio" name="buttons" value="useful"> <label for="rbb2">super useful</label> </li> <li> <input id="rbb3" type="radio" name="buttons" value="navigable"> <label for="rbb3">natively navigable</label> </li> </ul> </fieldset> <input type="submit" value="Submit"> </form>
<input id="rbb2" type="radio" name="r" value="explicit"> <label for="rbb2">explicit label</label> <label> <input type="radio" name="r" value="implicit"> implicit label </label>
opacity: 0;
position: absolute;
input[type="radio"]:checked + label
::before
/::after
with:-webkit-appearance: none;
<form action="editaddress.html"> <fieldset> <legend>Select an address to edit:</legend> <div class="carousel"> <span class="backward" data-move="backward" data-carousel="shipping-addresses" hidden aria-hidden="true"></span> <ul class="shipping-addresses left0"> <li> <label for="address1"> <p>Estelle Weyl</p> <p>The Stubborn Mule</p> <p>100 South Eola Drive</p> <p>Orlando, FL 32801</p> </label> </li> <li> <label for="address2"> <p>Elizabeth Warren</p> <p>1600 Pennsylvania Avenue NW</p> <p>Washington DC 20500</p> <p>202-456-1111</p> </label> </li> <li> <label for="address3"> <p>Tom Steyer</p> <p>1600 Pennsylvania Avenue NW</p> <p>Washington DC 20500</p> <p>202-456-1111</p> </label> </li> <li> <label for="address4"> <p>Bernie Sanders</p> <p>1600 Pennsylvania Avenue NW</p> <p>Washington DC 20500</p> <p>202-456-1111</p> </label> </li> <li> <label for="address5"> <p>Amy Klobuchar</p> <p>1600 Pennsylvania Avenue NW</p> <p>Washington DC 20500</p> <p>202-456-1111</p> </label> </li> <li> <label for="address6"> <p>Nancy Pelosi</p> <p>1600 Pennsylvania Avenue NW</p> <p>Washington DC 20500</p> <p>202-456-1111</p> </label> </li> </ul> <span class="forward" data-move="forward" data-carousel="shipping-addresses" hidden aria-hidden="true"></span> </div> <ul id="addressradios" class="carousel-radios"> <li> <input type="radio" name="shipping-addresses" value="0" id="address1" checked><span></span> </li> <li> <input type="radio" name="shipping-addresses" value="1" id="address2"><span></span> </li> <li> <input type="radio" name="shipping-addresses" value="2" id="address3"><span></span> </li> <li> <input type="radio" name="shipping-addresses" value="3" id="address4"><span></span> </li> <li> <input type="radio" name="shipping-addresses" value="4" id="address5"><span></span> </li> <li> <input type="radio" name="shipping-addresses" value="5" id="address6"><span></span> </li> </ul> </fieldset> <div class="buttons"> <input type="submit" class="btn button-link" value="Edit"> <a href="addaddress.html" class="btn button-link">Add<span class="a11y"> a new address</span></a> </div> </form>
<fieldset id="languageSelector"> <legend>Select your country:</legend> <ul> <li> <input type="radio" name="langSelect" id="langAR" value="AR"> <label for="langAR" class="langAR">Argentina</label> </li> <li> <input type="radio" name="langSelect" id="langAU" value="AU"> <label for="langAU" class="langAU">Australia</label> </li> <li> <input type="radio" name="langSelect" id="langBR" value="BR"> <label for="langBR" class="langBR">Brazil</label> </li> <li> <input type="radio" name="langSelect" id="langCA" value="CA"> <label for="langCA" class="langCA">Canada</label> </li> <li> <input type="radio" name="langSelect" id="langCL" value="CL"> <label for="langCL" class="langCL">Chile</label> </li> <li> <input type="radio" name="langSelect" id="langCN" value="CN"> <label for="langCN" class="langCN">China</label> </li> <li> <input type="radio" name="langSelect" id="langCO" value="CO"> <label for="langCO" class="langCO">Colombia</label> </li> <li> <input type="radio" name="langSelect" id="langHK" value="HK"> <label for="langHK" class="langHK">Hong Kong</label> </li> <li> <input type="radio" name="langSelect" id="langMY" value="MY"> <label for="langMY" class="langMY">Malaysia</label> </li> <li> <input type="radio" name="langSelect" id="langMX" value="MX"> <label for="langMX" class="langMX">Mexico</label> </li> <li> <input type="radio" name="langSelect" id="langNZ" value="NZ"> <label for="langNZ" class="langNZ">New Zealand</label> </li> <li> <input type="radio" name="langSelect" id="langPE" value="PE"> <label for="langPE" class="langPE">Peru</label> </li> <li> <input type="radio" name="langSelect" id="langSG" value="SG"> <label for="langSG" class="langSG">Singapore</label> </li> <li> <input type="radio" name="langSelect" id="langZA" value="ZA"> <label for="langZA" class="langZA">South Africa</label> </li> <li> <input type="radio" name="langSelect" id="langAE" value="AE"> <label for="langAE" class="langAE">United Arab Emirates</label> </li> <li> <input type="radio" aria-selected="true" checked="" name="langSelect" id="langUS" value="US"> <label for="langUS" class="langUS">United States</label> </li> </ul> </fieldset>