HOME C C++ PYTHON JAVA HTML CSS JAVASCRIPT BOOTSTRAP JQUERY REACT PHP SQL AJAX JSON DATA SCIENCE AI

Select Menu

To style a select menu in Bootstrap 5, add the .form-select class to the

Select Menu Size

Use the .form-select-lg or .form-select-sm class to change the size of the select menu:

Bootstrap Select

<select class="form-select form-select-lg">
<select class="form-select">
<select class="form-select form-select-sm">                 
              

Disabled Select Menu

Use the disabled attribute to disable the select menu:

Example

<select class="form-select" disabled>
  <option>1</option>
  <option>2</option>
  <option>3</option>
  <option>4</option>
</select>                  
              
You can click on above box to edit the code and run again.

Data Lists

Bootstrap will also style data lists, which is a list of pre-defined options for an <input> element:

Example

<label for="browser" class="form-label">Choose your browser from the list:</label>
<input class="form-control" list="browsers" name="browser" id="browser">
<datalist id="browsers">
  <option value="Edge">
  <option value="Firefox">
  <option value="Chrome">
 <option value="Opera">
  <option value="Safari">
</datalist>                
You can click on above box to edit the code and run again.

Output