<commit_before>---
title: Select2
---

<h3 class="guide-subsection-title">Single Select</h3>
<div class="guide-example">
    <div class="form-group">
        <label for="single" class="control-label">State</label>
        <select id="single" class="form-control select2">
            <option></option>
            <optgroup label="Alaskan/Hawaiian Time Zone">
                <option value="AK">Alaska</option>
                <option value="HI">Hawaii</option>
            </optgroup>
            <optgroup label="Pacific Time Zone">
                <option value="CA">California</option>
                <option value="NV">Nevada</option>
                <option value="OR">Oregon</option>
                <option value="WA">Washington</option>
            </optgroup>
            <optgroup label="Mountain Time Zone">
                <option value="AZ">Arizona</option>
                <option value="CO">Colorado</option>
                <option value="ID">Idaho</option>
                <option value="MT">Montana</option><commit_msg>add Select2 empty option callcout to dropdown docs<commit_after>---
title: Select2
---

<h3 class="guide-subsection-title">Single Select</h3>
<div data-markdown>
> Select2 requires an empty `<option></option>` tag in order for the plugin option `allowClear` to work properly.
</div>
<div class="guide-example">
    <div class="form-group">
        <label for="single" class="control-label">State</label>
        <select id="single" class="form-control select2">
            <option></option>
            <optgroup label="Alaskan/Hawaiian Time Zone">
                <option value="AK">Alaska</option>
                <option value="HI">Hawaii</option>
            </optgroup>
            <optgroup label="Pacific Time Zone">
                <option value="CA">California</option>
                <option value="NV">Nevada</option>
                <option value="OR">Oregon</option>
                <option value="WA">Washington</option>
            </optgroup>
            <optgroup label="Mountain Time Zone">
                <option value="AZ">Arizona</option>
                <option value="CO">Colorado</option>
                <option value="ID">Idaho</option>
                <option value="MT">Montana</option>
{'fraction_non_alphanumeric': 0.14937943262411346, 'fraction_numerical': 0.004432624113475178, 'mean_word_length': 2.2335243553008595, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 76, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2748722', 'n_tokens_mistral': 644, 'n_tokens_neox': 603, 'n_words': 129}