I have started an article series on Bootstrap and published three articles so far. Read the previous three parts here.
In this article we will learn how to create and modify buttons using Bootstrap Buttons Classes.
Bootstrap Buttons
Buttons play various role in websites and applications and are used to submit, reset, show and hide on click of button, link button etc.
Bootstrap Buttons
Buttons play various role in websites and applications and are used to submit, reset, show and hide on click of button, link button etc.
By using Bootstrap we can easily create and customize the buttons.
Bootstrap Button Styles
In Bootstrap different classes are used for styling the buttons and styles can be applied to any element like <a>, <button> and <input>.
Bootstrap provides seven styles of buttons:

Bootstrap Button Styles
In Bootstrap different classes are used for styling the buttons and styles can be applied to any element like <a>, <button> and <input>.
Bootstrap provides seven styles of buttons:

To apply the button styles, Bootstrap provides the following classes:
- .btn-default: Default gray color Standard button
- .btn-primary:To indicate primary action button
- .btn-info:Used for informational alert messages
- .btn-success:Indicates a successful or positive action
- .btn-danger: Indicates a dangerous or negative action.
- .btn-warning:Indicates caution should be taken with this action
- .btn-link: Button look like a link with maintaining button behavior
Example 1: Bootstrap Button Styles
In this example we will create buttons and by using above classes we will apply styles on buttons through the following code.
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Bootstrap Part4</title>
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"> </head>
- <body>
- <div class="container">
- <h1>Button Styles</h1>
- <!--Button Style1:Default--><button type="button" class="btn btn-default">Default Button</button>
- <!--Button Style2:Primary--><button type="button" class="btn btn-primary">Primary Button</button>
- <!--Button Style3:Info--><button type="button" class="btn btn-info">Info Button</button>
- <!--Button Style4:Success--><button type="button" class="btn btn-success">Success Button</button>
- <!--Button Style5:Danger--><button type="button" class="btn btn-danger">Danger Button</button>
- <!--Button Style6:Warning--><button type="button" class="btn btn-warning">Warning Button</button>
- <!--Button Style7:Link--><button type="button" class="btn btn-link">Link Button</button> </div>
- <script src="js/jquery-2.1.4.min.js"></script>
- <script src="js/bootstrap.min.js"></script>
- </body>
- </html>






Manish JainPosted Jul 1, 2019, 1:47 AM
Please provide information to use click event of any such button to call my Contoller's action in MVC project
Prasanna MuraliPosted May 20, 2016, 11:18 AM
Nice one....
Cao FangshengPosted May 5, 2016, 5:43 AM
good article
Sonu ChaudharyPosted May 2, 2016, 6:01 AM
Thanks for sharing
Vivek KumarPosted Apr 28, 2016, 3:02 PM
Good one
Humayun Kabir MamunPosted Apr 11, 2016, 12:32 AM
Nice...
Kuppurasu NagarajPosted Apr 9, 2016, 10:26 AM
Nice article..
Vignesh ManiPosted Apr 8, 2016, 5:20 PM
good one
Gowtham RajamanickamPosted Apr 8, 2016, 8:52 AM
nice one
Michael GriffithsPosted Apr 7, 2016, 6:04 PM
Nice
Rahul Kumar SaxenaPosted Apr 7, 2016, 1:34 PM
Good Show
Mohammed IbrahimPosted Apr 7, 2016, 12:48 PM
nice
MannanPosted Apr 7, 2016, 10:46 AM
Good one
Debasis SahaPosted Apr 7, 2016, 10:23 AM
Nice One..
Mohsin AzamPosted Apr 7, 2016, 9:26 AM
nice article for begginers