In the WW3 tutorial “Try it” page for the optgroup tag (See: [url]http://www.w3schools.com/tags/tag_optgroup.asp
the code is:
[code]
<select>
<optgroup label=”Swedish Cars”>
<option value=”volvo”>Volvo</option>
<option value=”saab”>Saab</option>
</optgroup>
<optgroup label=”German Cars”>
<option value=”mercedes”>Mercedes</option>
<option value=”audi”>Audi</option>
</optgroup>
</select>
However, when the tags are NOT grouped around the various options, it appears to work the SAME.
[code]
<!DOCTYPE html>
<html>
<body>
<select>
<optgroup label=”Swedish Cars”> </optgroup>
<option value=”volvo”>Volvo</option>
<option value=”saab”>Saab</option>
<optgroup label=”German Cars”> </optgroup>
<option value=”mercedes”>Mercedes</option>
<option value=”audi”>Audi</option>
</select>
</body>
</html>
Is this two different ways to accomplish the same thing or is one code definitely better than the other?
?