Answer the question
In order to leave comments, you need to log in
What button types to use and when Bootstrap 3?
There are 4 main types of buttons using Twitter Bootstrap 3.
Which ones should be used and when? ??
1 - Ссылкой:
<a href="" class="btn btn-success btn-lg" role="button" > Button by ' a '</a>
2 - Кнопкой:
<button class="btn btn-primary" type="submit"> Button by ' button '</button>
3 - Инпутом:
<input type="button" class="btn btn-danger btn-sm" value="Button by ' input '">
4 - Инпутом :
<input type="submit" class="btn btn-info btn-xs" value="Button by ' input + submit '">
Answer the question
In order to leave comments, you need to log in
Normal html semantics. a
- a link, a transition to another document button
- a ui element for some action on click (add to cart for example) button[type=submit]
, input[type=submit]
- submitting a form
The difference between input and button in this case is the impossibility to nest elements inside or use after/before pseudo-elements.
Bootstrap is just a set of css styles, not some other universe.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question