Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Bootstrap5 Dropdowns

Bootstrap5 Dropdowns

A dropdown can be a single-select dropdown or a multi-select dropdown.

Single-select dropdown:

Multi-select dropdown:

In Bootstrap5, dropdown menu elements to set up a dropdown:

The following example selects a website from a list:

Example

<label for="browser" class="form-label">

Select your favorite website:

label

<

input

class

=

"

form-control

"

list

=

"

sites

"

name

=

"

site

"

id

=

"

site

"

<

datalist

id

=

"

sites

"

<

option

value

=

"

Google

"

<

option

value

=

"

Runoob

"

<

option

value

=

"

Taobao

"

<

option

value

=

"

Wiki

"

<

option

value

=

"

Zhihu

"

datalist

Try it »

The effect is shown in the figure below: