Home >Web Front-end >HTML Tutorial >Create an options group in HTML
HTML
The following are the properties-
Properties | Value | Description |
---|---|---|
Disabled | Disabled | Disable input controls. The button will not accept changes from the user. It also fails to receive focus and is skipped on tabbing. |
Tag | Text | define when using |
You can try running the following code to create an option group in HTML -
<!DOCTYPE html> <html> <head> <title>HTML optgroup Tag</title> </head> <body> <select> <optgroup label = "India"> <option value = "mumbai">Mumbai</option> <option value = "delhi">Delhi</option> </optgroup> <optgroup label = "USA"> <option value = "florida">Florida</option> <option value = "newyork">New York</option> </optgroup> </select> </body> </html>
The above is the detailed content of Create an options group in HTML. For more information, please follow other related articles on the PHP Chinese website!