All 1 entries tagged Useful

View all 2 entries tagged Useful on Warwick Blogs | View entries tagged Useful at Technorati | There are no images tagged Useful on this blog

February 16, 2007

<optgroup>

I've just found a useful HTML element that I hadn't come accross before: <optgroup>.

It's used in drop-down lists in forms to create categories that aren't selectable, for example:

<select>
  <optgroup label="Odd">
    <option value="1">One</option>
    <option value="3">Three</option>
    <option value="5">Five</option>
  </optgroup>
  <optgroup label="Even">
    <option value="2">Two</option>
    <option value="4">Four</option>
    <option value="6">Six</option>
  </optgroup>
</select>

would give:

So, hours of endless fun and entertainment...


January 2020

Mo Tu We Th Fr Sa Su
Dec |  Today  |
      1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31      
RSS2.0 Atom

Search this blog

Twitter

Google PageRank

Tags

Not signed in
Sign in

Powered by BlogBuilder
© MMXX