w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



select required attribute

The required attribute on the select element:

Examples

<selectattribute="value(s)">...<⁄select>example
6.required="",  , required<select required> ... <⁄select>
<select required=""> ... <⁄select>
<select required="required"> ... <⁄select>

Video demonstration select required attribute

HTML5 select required attribute Tutorial

min video details
00:00 video tutorial: required attribute on select element
00:05 required attribute on select element indicates that at least 1 option must be selected
00:11 adding the required attribute on select element
00:19 1 option (GMT+7) has been selected
(you can have 1 option selected or multiple options selected if multiple attribute is present also on select element; what is important in the case of the required attribute is: at least 1 option to be selected)
select intro select browser display select parents - children select Placeholder Label Optionselect Constraintsselect Exampleselect syntaxselect autofocus attributeselect disabled attributeselect multiple attributeselect size attribute