![]() |
VOOZH | about |
The <input type="radio"> element in HTML is used to create radio buttons for selecting one option from multiple choices. Only one radio button in the same group can be selected at a time.
Syntax:
<input type="radio" name="groupName" value="option">Note: The value attribute gives each radio button a unique identifier, helping identify the selected option upon form submission.
Example 1: The HTML <input type="radio"> creates a set of radio buttons for selecting a technology brand. Only one option can be selected at a time, with "Microsoft" pre-selected using the checked attribute.
Example 2: The HTML <input type="radio"> is used to create multiple radio buttons, allowing users to choose one option. All options share the same name attribute, ensuring that only one can be selected at a time.
Some use cases are given below: