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-horizontalto the form.For the label, input, and validation error spans use the CSSÂ
col-sm-2,col-sm-4, andÂcol-sm-3Â classes respectivelyFor labels, apply the CSS class
control-labelFor input HTML elements, the
form-controlCSS class is appliedFor each of the form groups (containing the HTML elements such as label and input), apply the CSS class
form-groupFor all validation error messages, apply the
text-dangerCSS class so that they will be shown in redApply the
table,table-borderedCSS class to style the table
The following is the complete updated...