optgroup disabled Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:optgroup

Description

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:

Demo Code

ResultView the demo in separate window

<!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>

Related Tutorials