AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL

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

Following example shows the code for the different button styles:

 

Bootstrap Button Styles

This example will create Bootstrap Button Styles:

Example:

<!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:

Example:

<!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:

Example:

<!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

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


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


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


0
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


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


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.