type radio code example
Example 1: radio buttons html
<input type="radio" name="gender" value="male"> Male<br>
<input type="radio" name="gender" value="female"> Female<br>
<input type="radio" name="gender" value="other"> Other
Example 2: html radio button checked
<input type="radio" id="huey" name="drone" value="huey"
checked>
Example 3: input radio html
<form>
<p>Veuillez choisir la meilleure méthode pour vous contacter :</p>
<div>
<input type="radio" id="contactChoice1"
name="contact" value="email">
<label for="contactChoice1">Email</label>
<input type="radio" id="contactChoice2"
name="contact" value="telephone">
<label for="contactChoice2">Téléphone</label>
<input type="radio" id="contactChoice3"
name="contact" value="courrier">
<label for="contactChoice3">Courrier</label>
</div>
<div>
<button type="submit">Envoyer</button>
</div>
</form>
Example 4: radio selected
//checked
<input type="radio" id="huey" name="drone" value="huey"
checked>
Example 5: radio input value
<input type="radio" name="test" id="test" value="this is the value">