Bootstrap Forms

This article will help you to study how to create forms easily using Bootstrap. You can make it easy with the simple HTML markup using different styles of Bootstrap forms with extensive classes.
Form Layout
Bootstrap gives different types of form layouts.
- Vertical (default) form
- Inline form
- Horizontal form
Vertical or Basic Form
The basic form composition approaches with Bootstrap, some global styles applied automatically on form controls. For make basic forms use the following code.
-
Use a role form in the the main tag <form>.
-
Wrap labels and input tags in a <div> and use class .form-group. This is required for best possible spacings in the controls.
-
Use this class of “.form-control” to all form controls <input>, <textarea>, and <select> tags.
1 |
Inline form
For making all elements of form in one row or inline add this class “.form-inline” in the