Form layout and elements
Forms make up a large section of most line-of-business applications, and therefore, applying a uniform style to all forms in your web application is not only visually pleasing but also provides your users with a friendlier interface. Bootstrap provides a range of CSS styles to enable you to create visually appealing forms.
Vertical/basic forms
The basic form in Bootstrap always displays its contents in a vertical manner, which means that labels for form <input>
elements are displayed above them. With Bootstrap 4, the <fieldset>
elements do not have any borders, padding, or margins, and they can be used to wrap inputs into groups by setting the <fieldset>
element's class to .form-group
. Form elements can also be grouped by placing them inside a <div>
element with a class of .form-group
.
In the HTML markup that follows, a HTML form will be created using the new ASP.NET Core Tag Helpers containing two Bootstrap form input elements and a submit...