css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <h1>Optgroups cause odd behaviour in iOS6</h1>

<p>Check out my article for more info: <a href="https://www.thecssninja.com/html/optgroup-ios6" target="_blank">https://www.thecssninja.com/html/optgroup-ios6</a></p>

<label>Big select with option groups</label>
<select id="catparentlocation" name="parentlocation" size="8" multiple="multiple"><option value="0">All Locations</option><option value="3000|12">All Australia</option><optgroup label="Major Cities" class="searchbox-group"><option value="1000|1">Sydney</option><option value="1002|1">Melbourne</option><option value="1004|1">Brisbane</option><option value="1005|1">Gold Coast</option><option value="1009|1">Perth</option><option value="1007|1">Adelaide</option><option value="1011|1">Hobart</option><option value="1013|1">Darwin</option><option value="3100|13">Canberra</option></optgroup><optgroup label="Regional" class="searchbox-group"><option value="3101|13">NSW</option><option value="3106|13">VIC</option><option value="3103|13">QLD</option><option value="3107|13">WA</option><option value="3104|13">SA</option><option value="3105|13">TAS</option><option value="3100|13">ACT</option><option value="3102|13">NT</option></optgroup><optgroup label="New Zealand" class="searchbox-group"><option value="3001|12">All New Zealand</option><option value="1018|1">Auckland</option><option value="5101|1">Northland</option><option value="5126|1">Waikato</option><option value="5089|1">Bay of Plenty</option><option value="5104|1">Gisborne</option><option value="5085|1">Hawkes Bay</option><option value="5082|1">Taranaki</option><option value="5097|1">Manawatu</option><option value="1019|1">Wellington</option><option value="5131|1">Tasman</option><option value="5079|1">Marlborough</option><option value="5113|1">Canterbury</option><option value="5093|1">Otago</option><option value="5123|1">West Coast</option><option value="5110|1">Southland</option></optgroup><optgroup label="UK &amp; Ireland" class="searchbox-group"><option value="3002|12">All UK &amp; Ireland</option><option value="5161|1">London</option><option value="5150|1">Rest of UK</option><option value="1025|1">Ireland</option></optgroup><optgroup label="Other" class="searchbox-group"><option value="3003|12">All Other</option><option value="5140|1">Asia Pacific</option><option value="5137|1">Americas</option><option value="5134|1">Europe &amp; Russia</option><option value="5147|1">Middle East &amp; Africa</option></optgroup></select>

<label>Small select with option group</label>
<select id="catchildlocation" data-multiple="true" name="childlocation" size="8" multiple="multiple"><option value="0">All Sydney</option><optgroup label="Sydney Areas" class="searchbox-group"><option value="5027">CBD, Inner West &amp; Eastern Suburbs</option><option value="5028">North Shore &amp; Northern Beaches</option><option value="5029">North West &amp; Hills District</option><option value="5030">Parramatta &amp; Western Suburbs</option><option value="5031">Ryde &amp; Macquarie Park</option><option value="5032">Southern Suburbs &amp; Sutherland Shire</option><option value="5033">South West &amp; M5 Corridor</option></optgroup></select>

<label>Select with no option group</label>
<select multiple="multiple">
  <option value="0">All Sydney</option>
  <option disabled style="font-weight: 700; color: #000;">Sydney Areas</option>
    <option value="5027">CBD, Inner West &amp; Eastern Suburbs</option>
    <option value="5028">North Shore &amp; Northern Beaches</option>
    <option value="5029">North West &amp; Hills District</option>
    <option value="5030">Parramatta &amp; Western Suburbs</option>
    <option value="5031">Ryde &amp; Macquarie Park</option>
    <option value="5032">Southern Suburbs &amp; Sutherland Shire</option>
    <option value="5033">South West &amp; M5 Corridor</option
              select {
  padding: 5px;
  width: 300px;
  display: block;
  margin: 0 0 10px;
label {
  display: block;
  margin: 0 0 5px;
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................