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

HTML / CSS
1. Background Attributes
2. Basic Attributes
3. Basic Tags
4. Box Model
5. CSS Attributes and Javascript Style Properties
6. CSS Controls
7. Form Attributes
8. Form Style
9. Form Tags
10. Frame Attributes
11. Frame Tags
12. HTML
13. IE Firefox
14. Images
15. Layout
16. Layout Attributes
17. Link Attributes
18. Link Tags
19. List Attributes
20. List Style
21. List Tags
22. Marquee Attributes
23. Meta Tags
24. Microsoft Attributes
25. Object Attributes
26. Object Tags
27. Reference
28. Style Basics
29. Styles Tags
30. Table Attributes
31. Table Style
32. Table Tags
33. Text
34. Text Attributes
35. Text Tags
36. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 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
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.