HTML CSS examples for HTML Tag:optgroup
The disabled attribute is a boolean attribute to set if an option-group should be disabled.
In XHTML, the disabled attribute must be defined as <optgroup disabled="disabled">.
The following code shows how to create A disabled option-group:
<!DOCTYPE html> <html> <body> <select> <optgroup label="Swedish Cars"> <option value="css">CSS</option> <option value="java">Java</option> </optgroup> <optgroup label="database" disabled> <option value="javascript">Javascript</option> <option value="sql">SQL</option> </optgroup> </select><!--from ww w .j av a 2 s .co m--> </body> </html>