Easy learning with example program codes

Bootstrap Inline Form Tutorial

Form act as a container for form elements. All textual input, textarea, and select elements with class .form-control have a width of 100%.

In bootstrap inline form, all of the elements are inline, left-aligned, and the labels are alongside.

Note: This example applies to forms within view ports that are at least 768px wide!

Standard rules for Inline form layouts:
• Wrap labels and form controls in div class=”form-group.
• Add class .form-control to all textual input, textarea, and select elements.
• Add class .form-inline to the


Bootstrap Inline Form Example:

<!DOCTYPE html>
<html lang="en">
  <title>Bootstrap Inline Form Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="">
  <script src=""></script>
  <script src=""></script>
<div class="container">
  <h2>Bootstrap Inline Form Example</h2>
  <form class="form-inline" action="actionName">
    <div class="form-group">
      <label for="email">Email:</label>
      <input type="email" class="form-control" id="email" placeholder="Enter email" name="email">
    <div class="form-group">
      <label for="pwd">Password:</label>
      <input type="password" class="form-control" id="pwd" placeholder="Enter password" name="pwd">
    <div class="checkbox">
      <label><input type="checkbox" name="remember"> Remember me</label>
    <button type="submit" class="btn btn-default">Submit</button>

Try it:

Bootstrap Inline Form Example on

Please follow and like us:

Bootstrap 3 Tutorial

Copyright © 2020 CodesJava Protection Status