checked radio button code example

Example 1: html radio button checked

<input type="radio" id="huey" name="drone" value="huey"
         checked> 
<!-- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio-->

Example 2: radio by default selected

checked="checked"

Example 3: radio selected

//checked
  <input type="radio" id="huey" name="drone" value="huey"
         checked>

Example 4: checkbox as radio button

input[type=checkbox]:not(old) + label,
input[type=radio   ]:not(old) + label{
  display      : inline-block;
  margin-left  : -2em;
  line-height  : 4em;
}

Tags: