Can badges be used inside a button class?

Questions & AnswersCategory: Programming LanguageCan badges be used inside a button class?
1 Answers
Lokesh Kumar Staff answered 3 years ago

a. True
 
Explanation: Yes, Badges can be used inside a button class.
The syntax for creating a badge inside a button in Bootstrap 4 is given below:

<button type="button" class="btn btn-primary">
   Messages <span class="badge badge-light">5</span>
  </button>