programming-examples/html/Basics/Grouping of options inside a select box.html

20 lines
605 B
HTML
Raw Permalink Normal View History

2019-11-18 14:44:36 +01:00
<!DOCTYPE html>
<html subLang="en">
<head>
<title>Example of HTML optgroup tag</title>
</head>
<body>
<form>
<select>
<optgroup label="Sports cars">
<option value="ferrari">Ferrari</option>
<option value="lamborghini">Lamborghini</option>
</optgroup>
<optgroup label="Luxury cars">
<option value="mercedes">Mercedes</option>
<option value="bentley">Bentley</option>
</optgroup>
</select>
</form>
</body>
</html>