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

Bootstrap5 Forms

Bootstrap5 Forms

In this chapter, we will learn how to create forms with Bootstrap. Bootstrap can create forms of different styles using simple HTML tags and extended classes.

Form Element ,

<input type="text" class="form-control" placeholder=">

Readonly input

"

readonly

Try it »


Plain text input

Using the .form-control-plaintext class removes the border of the input box::

Example

<input type="text" class="form-control-plaintext" placeholder=">

Plaintext input

"

<input type="text" class="form-control" placeholder=">

Normal input

"

Try it »


Color picker

Using the .form-control-color class creates a color picker:

Example

<input type="color" class=">

form-control form-control-color

"

value

=

"

#CCCCCC

"

Try it »

Display effect: