'optgroup' creates multiple options within a 'select' element list : optgroup « Form Tags « HTML / CSS

HTML / CSS
1. Action Attributes
2. Background Attributes
3. Basic Attributes
4. Basic Tags
5. CSS Attributes and Javascript Style Properties
6. Form Attributes
7. Form Tags
8. Frame Attributes
9. Frame Tags
10. Image Attributes
11. Images Tags
12. Layout Attributes
13. Link Attributes
14. Link Tags
15. List Attributes
16. List Tags
17. Marquee Attributes
18. Meta Tags
19. Microsoft Attributes
20. Object Attributes
21. Object Tags
22. Reference
23. Styles Tags
24. Table Attributes
25. Table Tags
26. Text Attributes
27. Text Tags
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
HTML / CSS » Form Tags » optgroup 
'optgroup' creates multiple options within a 'select' element list

    

<html>
<head>
<title>option element example</title>
</head>
<body>
    <form name="form1" method="post" action="youractionscript.asp">
    <p>
        <span class="example">
            <select name="select1">
                <optgroup label="First Group">
                    <option>First item in first group</option>
                    <option>Second item in first group </option>
                    <option>Third item in first group </option>
                </optgroup>
                <optgroup label="Second Group">
                    <option>First item in second group </option>
                    <option>Second item in second group </option>
                    <option>Third item in second group </option>
                </optgroup>
                <optgroup label="Group 3">
                    <option>First item in Group 3</option>
                    <option>Second item in Group 3</option>
                    <option>Third item in Group 3</option>
                </optgroup>
            </select>
        </span>
    </p>
    </form>
</body>
</html>
    
      
      
Related examples in the same category
ww_w_.__j___a_v___a___2__s___.__c___o__m___ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.