I am just wondering how to use the new HTML5 input attribute \"required\" in the right way on radio buttons. Does every radio button field need the attribute like below or i
You can use this code snippet ...
Specify "required" keyword in one of the select statements. If you want to change the default way of its appearance. You can follow these steps. This is just for extra info if you have any intention to modify the default behavior.
Add the following into you .css
file.
/* style all elements with a required attribute */
:required {
background: red;
}
For more information you can refer following URL.
https://css-tricks.com/almanac/selectors/r/required/