Bootstrap Buttons With Different Colours

 
  • .btn btn-default class used to give transparent colour to button.
  • .btn btn-primary class is used to give blueish colour to button.
  • .btn btn-success is used to give the greenish colour to button.
  • .btn btn-info class is used to give the skyblue colour to button.
  • .btn btn-warning class is used to give the yellow colour to the button.
  • .btn btn-danger class is used to give red colour to the button.
 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Bootstrap Button Example</title> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> </head> <body> <div> <h2>Button Colours</h2> <button type="button" class="btn btn-default">Default</button> <button type="button" class="btn btn-primary">Primary</button> <button type="button" class="btn btn-success">Success</button> <button type="button" class="btn btn-info">Info</button> <button type="button" class="btn btn-warning">Warning</button> <button type="button" class="btn btn-danger">Danger</button> </div> </body> </html>
Output