Home > Article > Web Front-end > How to create a form layout using Bootstrap
Bootstrap provides three types of form layouts: vertical forms, horizontal forms, and inline forms; they are set by externally introducing JavaScript and CSS files in Bootstrap and adding class names to elements. Form controls
HTML forms are an integral part of web pages and applications, but manually setting up form controls one by one using only CSS is often cumbersome and tedious. Nowadays, with the emergence of bootstrap, the styling and alignment process of form controls such as labels, input fields, selection boxes and submit boxes in the form has been greatly simplified. Next, in the article, we will introduce the form layout style in Bootstrap in detail
[Recommended course: Bootstrap course]
There are three different types of form layouts provided in Bootstrap:
Vertical form (default table layout)
Horizontal form
Inline form
In the following article, I will introduce these form layouts and details in detail one by one. Various form-related Bootstrap components
Externally introduce Bootstrap
<link rel="stylesheet" type="text/css" href=".\bootstrap-3.3.7-dist\css\bootstrap.css"> <script type="text/javascript" src=".\bootstrap-3.3.7-dist\js\bootstrap.min.js"></script>
Create vertical form layout
This is the default Bootstrap form layout where styles are applied to form controls without adding any base classes to the
The above is the detailed content of How to create a form layout using Bootstrap. For more information, please follow other related articles on the PHP Chinese website!