Bootstrap Buttons
Bootstrap 3 Tutorial » Bootstrap Buttons
Button styles can be applied to any element and it is applied normally to the <a>, <input>, and <button> elements for the best rendering.
Bootstrap has the following classes
- .btn
- .btn btn-link
- .btn btn-light
- .btn btn-dark
- .btn-info
- .btn btn-success
- .btn-warning
- .btn btn-secondary
- .btn btn-primary
- .btn-danger
- .btn-link
Following example shows the code for the different button styles:
Bootstrap Button Styles
This example will create Bootstrap Button Styles:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap has the following classes Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body><div class="container">
<h2>Bootstrap Button Styles</h2>
<button type="button" class="btn">Basic</button>
<button type="button" class="btn btn-default">Default</button>
<button type="button" class="btn btn-primary">Primary</button>
<button type="button" class="btn btn-secondary">Secondary</button>
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-light">Light</button>
<button type="button" class="btn btn-info">Info</button>
<button type="button" class="btn btn-dark">Dark</button>
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-link">Link</button>
</div></body>
</html>
Button Sizes - example
Bootstrap provides four button sizes as:
- .btn-lg
- .btn-sm
- .btn-xs
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap provides four button sizes as Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body><div class="container">
<h2>Bootstrap provides four button sizes as:</h2>
<button type="button" class="btn btn-primary btn-lg">Large</button>
<button type="button" class="btn btn-primary">Normal</button>
<button type="button" class="btn btn-primary btn-sm">Small</button>
<button type="button" class="btn btn-primary btn-xs">XSmall</button>
</div></body>
</html>
Block Level Buttons - example
This class .btn-block will create a block level button:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Block Level Buttons - example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body><div class="container">
<h2>Block Level Buttons - example</h2>
<button type="button" class="btn btn-primary btn-block">my_Button 1</button>
<button type="button" class="btn btn-default btn-block">my_Button 2</button><h2>Large Block Level Buttons - example</h2>
<button type="button" class="btn btn-primary btn-lg btn-block">my_Button 1</button>
<button type="button" class="btn btn-default btn-lg btn-block">my_Button 2</button><h2>Small Block Level Buttons - example</h2>
<button type="button" class="btn btn-primary btn-sm btn-block">my_Button 1</button>
<button type="button" class="btn btn-default btn-sm btn-block">my_Button 2</button>
</div></body>
</html>
Bootstrap Buttons with icons, colors, group, css, icon, style, space between, responsive, link, outline
Bootstrap Buttons - bootstrap
This tool makes it easy to create, adjust, and experiment with custom colors for the web.

Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.

Find here examples of creative and unique website layouts.

Find here examples of creative and unique website CSS HTML menu.