w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



optgroup ... ⁄optgroup syntax

Syntax optgroup

Examples optgroup syntax

Valid Syntax 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!doctype html>
<html>
<head>
<title>...</title>
</head>
<body>

<select>
<optgroup>...
<optgroup>...
</select>

</body>
</html>
Valid Syntax 2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!doctype html>
<html>
<head>
<title>...</title>
</head>
<body>

<select>
<optgroup>...</optgroup>
<optgroup>...</optgroup>
</select>

</body>
</html>

Video demonstration optgroup element, syntax

HTML5 optgroup element, syntax Tutorial

min video details
00:05 video tutorial: optgroup element, syntax
00:10 adding the optgroup element in page
00:18 the optgroup element has:

- a start tag: <optgroup>
- and an end tag: <⁄optgroup>
00:23 end tag <⁄optgroup> may be omitted if the optgroup element is immediately followed by another optgroup element
00:32 end tag <⁄optgroup> may be omitted if there's no more content after the optgroup element inside the parent element, which is the select element
optgroup intro optgroup optional, occurrences optgroup browser display optgroup parents - children optgroup, option: disabled attributeoptgroup disabled attributeoptgroup label attribute