You add type="radio" to specify that it's a radio button. The label is very simple - it uses the for attribute to attach itself to a form element with a matching id attribute (notice how I have "dogs" in both places). However, if you try the example, you will notice that a single radio button doesn't really make sense. radio button Using radio button to accept Yes/No questions is best because the field accepts only one of the options. Here we define the radio button using "input" tag. T he value setting defines what will be submitted if checked. Visit docs.microsoft.com to know all the overloads of RadioButtonFor (). It references a JavaScript function which I have defined in the lower part of the example - a simple function which loops through all the pet-selection radio buttons and as soon as it hits one where the checked property is true, it asks the user for confirmation. As you select different options, watch the dot worm hop from the previous to the … This can of course be done with validation, but it's a lot simpler to just pre-check one of the options. Radio buttons are typically rendered as small circles, which are filled or highlighted when selected. then it will fill with another fulled circle. The checked property returns True if the radio button is selected and False otherwise. The value attribute is a DOMString containing the radio button's value. Beyond accessibility, this is another good reason to properly set up