<body>
<form>
<input type="radio" name="amount" value="10"/> $10 
<input type="radio" name="amount" value="25"/> $25 
<input type="radio" name="amount" value="50"/> $50 
<input type="radio" name="amount" value="100"/> $100 
<input type="radio" name="amount" value="250"/> $250 
<input type="radio" name="amount" value="other"/> Other
</form>
</body>
To make the $50 option the default selection what HTML code would I use?
Link to code bin demo
Just simply add
checked="checked"
in a declaration of button which you want to be default checked.
Just set it as checked:
<body>
<form>
<input type="radio" name="amount" value="10"/> $10 
<input type="radio" name="amount" value="25"/> $25 
<input type="radio" name="amount" value="50" checked="checked" /> $50 
<input type="radio" name="amount" value="100"/> $100 
<input type="radio" name="amount" value="250"/> $250 
<input type="radio" name="amount" value="other"/> Other
</form>
</body>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With