option ... ⁄option syntax
Syntax option
- start tag required: <option>
- end tag optional IF...: <⁄option>
<⁄option> optional IF...:
- option element is immediately followed by another option element Syntax 1a OR
- option element is immediately followed by an optgroup element Syntax 1b OR
- there is no more content after the option element inside the select element Syntax 1a
Examples option syntax
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <!doctype html> <> <> <>...</> </> <> <> <>... <>... </> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <!doctype html> <> <> <>...</> </> <> <> <>... <>... <>... </> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <!doctype html> <> <> <>...</> </> <> <> <>...</> <>...</> </> </> </> |
Video demonstration option element, syntax
HTML5 option element, syntax Tutorial
min | video details |
---|---|
00:06 | video tutorial: option element, syntax |
00:10 | adding the option element in page |
00:15 | the option element has: - a start tag: <option> - and an end tag: <⁄option> |
00:20 | the end tag: <⁄option> may be omitted IF: |
00:20 | 1. option element is followed next by another option element |
00:29 | 2. option element is followed next by optgroup element |
00:35 | 3. after option element, there's no more content inside the parent element, select |