What is the purpose of Bootstrap's `btn btn-primary` class?


#1

Question

What is the purpose of Bootstrap’s btn btn-primary class?

Answer

The btn btn-primary class is one of the styles of buttons provided by Bootstrap and gives more semantic meaning to the element (for yourself and for anyone reading your code). For example, the btn btn-primary class is normally used to denote that the element it’s on (<a>, <input>, or <button>) will perform the primary action of a form. Other useful Bootstrap button classes include btn btn-default, btn btn-success, btn btn-info, btn btn-warning, and btn btn-danger.