From the course: Bootstrap 5 Essential Training

Unlock this course with a free trial

Join today to access over 24,000 courses taught by industry experts.

Basic inputs

Basic inputs

- [Instructor] Bootstrap has its own custom form styles for a consistent display across different browsers. The form tag itself is not going to have any special container class, since form elements can be used with other elements without a form tag. But for other elements, you should use the Bootstrap classes to take advantage of the styling. The first one is, of course, form-label, which goes on the labels, form-control, which goes on input fields and other types of form elements, and form-text that goes on text that you want to be part of the form as information. There's also assistive device classes that you can use whenever you need to. Other than these fields, just make sure that you add the proper inputs and create the forms as you normally would in HTML. Let's take a look at an example. Here, you can see that I have just a couple of form elements to get us started. I have a basic input field and I have a text area. They're pretty easy to code. You just code them like you…

Contents