Bootstrap Form Layout Examples

Ruth Jul 09, 2026

Bootstrap, a popular CSS framework, offers a wide range of pre-defined classes to help you create responsive and mobile-first websites. One of its standout features is the ease with which it allows you to layout forms. In this article, we'll explore a comprehensive example of a Bootstrap form layout, breaking down its components and providing insights into the code.

the homepage for an employee portal with a rocket ship in the background and text that reads, apply as a employee
the homepage for an employee portal with a rocket ship in the background and text that reads, apply as a employee

Before diving into the code, let's briefly discuss why Bootstrap is an excellent choice for form layouts. It ensures consistency across different browsers, simplifies responsive design, and provides a clean, professional look out-of-the-box. Now, let's get started with our example.

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

Basic Form Structure

Every Bootstrap form begins with the `.form-horizontal` or `.form-vertical` class, which sets the alignment of labels and inputs. For this example, we'll use `.form-horizontal` to create a two-column layout.

Bootstrap Fieldset Legend: How To + Examples + Template | AZMIND
Bootstrap Fieldset Legend: How To + Examples + Template | AZMIND

The basic structure of our form will look like this:

```html

```

Form Groups

HTML Form Validation with Bootstrap
HTML Form Validation with Bootstrap

In Bootstrap, a form is composed of form groups, each containing a label and an input. The `.form-group` class is used to create these groups.

In the example above, we have a single form group with an email input. The `col-sm-2` class on the label and `col-sm-10` on the input ensure that the label and input are properly aligned in a responsive layout.

Input Types and Sizes

37 Free Bootstrap Form Templates You Can Try Right Now
37 Free Bootstrap Form Templates You Can Try Right Now

Bootstrap supports various input types, including text, password, email, and more. You can also specify the size of the input using the `.input-lg`, `.input-sm`, or `.input-xs` classes.

Here's an example of different input types and sizes:

```html

```

Form Controls and Buttons

an image of a website page with multiple screens
an image of a website page with multiple screens

Bootstrap provides several form control classes, such as `.form-control-static` for displaying static text, and `.form-control-static` for creating custom form controls.

For form buttons, you can use the `.btn` class along with various sizes and colors. Here's an example:

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Vertical Form, Horizontal Form, and Inline Form Example
Bootstrap Vertical Form, Horizontal Form, and Inline Form Example
Wizard
Wizard
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Forms
Bootstrap Forms
Best Free Bootstrap Login Forms » CSS Author
Best Free Bootstrap Login Forms » CSS Author
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Website Landing Page using HTML CSS Bootstrap 5 #3
Website Landing Page using HTML CSS Bootstrap 5 #3
Bootstrap Responsive Design Registration Form
Bootstrap Responsive Design Registration Form
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Free Bootstrap 4 Login Form
Free Bootstrap 4 Login Form
40+ Best Free Bootstrap Templates & Themes in 2026 — Speckyboy
40+ Best Free Bootstrap Templates & Themes in 2026 — Speckyboy
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

```html

```

Horizontal Form with Icons

You can also add icons to your form inputs using the `.glyphicon` class. Here's an example of a horizontal form with icons:

```html

```

Vertical Form

To create a vertical form, simply use the `.form-vertical` class instead of `.form-horizontal`. Here's an example:

```html

```

In conclusion, Bootstrap's form layout options provide a solid foundation for creating responsive and visually appealing forms. By understanding and utilizing the various classes and components, you can create forms that adapt to different screen sizes and devices with ease. Happy coding!