HTML doctype
Bootstrap makes use of certain HTML elements and CSS properties that require the use of HTML 5 doctype. By default, the view that you create in ASP.NET Core will have HTML 5 doctype only. So, we do not need to do anything regarding this.
<!DOCTYPE html> <html lang="en"> ... </html>
Let us make the following changes to our screen to make use of Bootstrap:
Apply the CSS class
form-horizontal
to the form.For the label, input, and validation error spans use the CSS
col-sm-2
,col-sm-4
, andcol-sm-3
classes respectivelyFor labels, apply the CSS class
control-label
For input HTML elements, the
form-control
CSS class is appliedFor each of the form groups (containing the HTML elements such as label and input), apply the CSS class
form-group
For all validation error messages, apply the
text-danger
CSS class so that they will be shown in redApply the
table
,table-bordered
CSS class to style the table
The following is the complete updated...