Bootstrap is a front-end framework for the improvement of web applications. It gives the facility to create understanding designs. There are many bootstrap commands that include CSS, HTML, and other templates as well. Bootstrap basic commands are mentioned below with examples.
Alert-primary
It is used as below for getting the alert message
<div class="alert alert-primay" role="alert"> <strong>Hello man! </strong> </div>
Alert-Info
<div class="alrt alrt-info" role="alrt"> <strong>Heads down! </strong> </div>
Alert-warning
it is used for getting the alert-warning as given below
<div class="alrt alrt-warning" role="alrt"> <strong>Warning! </strong> Please check . </div>
Badge bootstrap commands
<b1>Hello man <span class="badge badge-scndry">New</span></b1> <b2>Hello man <span class="badge badge-scndry">New</span></b2> <b3>Hello man <span class="badge badge-scndry">New</span></b3> <b4>Hello man <span class="badge badge-scndry">New</span></b4> <b5>Hello man <span class="badge badge-scndry">New</span></b5> <b6>Hello man <span class="badge badge-scndry">New</span></b6>
Badge-success
<span class="badge badge-success">Success</span>
Badge-primary
<span class="badge badge-primry">Identity</span>
Bread-crumb
<nav aria-label="bread-crumb"> <li class="bread-crumb-item active" aria-current="page">Root</li> </ol> </nav> <nav aria-label="bread-crumb"> <ol class="bread-crumb"> <li class="bread-crumb-item"><a href="#">Home</a></li> <li class="bread-crumb-item active" aria-current="page">Application</li> </ol> </nav>
Badge-info
<span class="badge badge-info">Info</span>
BTN-primary
<button type="button" class="btn btn-primry">Primry</button>
BTN-Info
<button type="button" class="button button-info">Info</button>
Form-Group
<form> <div class="f-group"> <label for="fGroupInput">Name label</label> <input type="text" class="f-control" id=" fGroupInput" placeholder=" Name label "> </div> </form>
Form-Inline
<form class="f-inline"> <label class="sr-only" for="inlineFInput">Name</label> <input type="text" class="f-control mb-2 mr-sm-2" id="inlineFInput" placeholder="TOM Curran"> <button type="submit" class="btn btn-primary mb-2">Submit</button> </form>
Form-Control
<input class="f-control" type="text" placeholder="Default">
Form-Check
<div class="f-check"> <input class="f-check-input" type="checkbox" value="" id="defaultCheck1"> <label class="f-check-label" for="defaultCheck1"> Default checkbox </label> </div> <div class="f-check"> <input class="f-check-input" type="radio" name="exampleRadios" id="exampleRadios1" value="option1" checked> <label class="f-check-label" for="exampleRadios1"> Default radio </label> </div>
Read-Only
<input class="f-control" type="text" placeholder="Input would be here--" readonly>
Input-Group
<div class="IP-group"> <div class="IP-group-prepend"> <span class="IP-group-text">Adding on left</span> </div> <input type="text" class="form-control"> <div class="IP-group-append"> <span class="IP-group-text">Right addon</span> </div> </div>
CheckBox
<div class="input-grp"> <div class="input-grp-prepend"> <div class="input-grp-text"> <input type="checkbox" aria-label="Checkbox for following text input"> </div> </div> <input type="text" class="f-control" aria-label="Text input with checkbox"> </div>
Radio
<div class="input-grp"> <div class="input-grp-prepend"> <div class="input-grp-text"> <input type="radio" aria-label="Radio button for following text input"> </div> </div> <input type="text" class="form-control" aria-label="Text input with radio button"> </div>
Dropdown
<div class="IP-group"> <div class="IP-group-prepend"> <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</button> <div class="dropdown-menu"> <a class="dropdown-item" href="#">Action</a> <a class="dropdown-item" href="#">Another action</a> </div> </div> <input type="text" class="form-control" aria-label="Text input with dropdown button"> </div>
Segmented- Button
<div class="input-grp mb-3"> <div class="input-grp-prepend"> <button type="button" class="btn btn-primary">Action</button> <button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <span class="sr-only">Toggle Dropdown</span> </button> <div class="dropdown-menu"> <a class="dropdown-item" href="#">Action</a> <a class="dropdown-item" href="#">Another action</a> </div> </div> <input type="text" class="form-control" aria-label="Text input with segmented dropdown button"> </div>
Jumbotron
<div class="jumbotron"> <h1 class="display-3">Hello, Pakistan!</h1> <p class="lead">This is a simple jumbotron-style component.</p> <hr class="my-2"> <p>It uses utility classes for typography and spacing to space content out within the larger container.</p> <p class="lead"> <a class="btn btn-primary btn-lg" href="#!" role="button">Some action</a> </p> </div>
list-group
<ul class="list-grp"> <li class="list-grp-item">One</li> <li class="list-grp-item">Two</li> <li class="list-grp-item">Three</li> </ul>
Dropdown
<div class="dropdown"> <button class="btn btn-scondry dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="drpdown" aria-haspopup="true" aria-expanded="false"> Dropdown </button> <div class="drpdown-menu" aria-labelledby="drpdownMenu1"> <a class="drpdown-item" href="#!">Action</a> <a class="drpdown-item" href="#!">Another action</a> </div> </div>
Pagination
<nav aria-label="Page navigation example"> <ul class="pagination"> <li class="pge-item"> <a class="pge-link" href="#!" aria-label="Previous"> <span aria-hidden="true">«</span> <span class="sr-only">Previous</span> </a> </li> <li class="pge-item"><a class="pge-link" href="#!">1</a></li> <li class="pge-item"><a class="pge-link" href="#!">2</a></li> <li class="pge-item"><a class="pge-link" href="#!">3</a></li> <li class="pge-item"> <a class="pge-link" href="#!" aria-label="Next"> <span aria-hidden="true">»</span> <span class="sr-only">Next</span> </a> </li> </ul> </nav>
popover
<button type="button" class="btn btn-scondry" data-container="body" data-toggle="popover" data-placement="top" data-content="Hello World."> Popover on top </button> <button type="button" class="btn btn-scondry" data-container="body" data-toggle="popover" data-placement="right" data-content=" Hello World."> Popover on right </button> <button type="button" class="btn btn-scondry" data-container="body" data-toggle="popover" data-placement="bottom" data-content=" Hello World."> Popover on bottom </button> <button type="button" class="btn btn-scondry" data-container="body" data-toggle="popover" data-placement="left" data-content=" Hello World."> Popover on left </button>
Progress
<div class="prgres"> <div class="prgres-bar" role="prgresbar" style="width: 41%" aria-valuenow="41" aria-valuemin="0" aria-valuemax="100"></div> </div>
Media
<div class="media"> <img class="d-flex mr-3" data-src="Script.js/64x64?theme=sky" alt="Generic placeholder image"> <div class="media-body"> <h5 class="mt-0">Media heading</h5> Put the content for display </div> </div>
Model
<button type="button" class="btn btn-primary" data-toggle="modl" data-target="#exampleModl"> Launch demo modl </button> <!-- Modal --> <div class="modl" id="exampleModl" tabindex="-1" role="dialog" aria-labelledby="exampleModlLabel" aria-hidden="true"> <div class="modl-dialog" role="document"> <div class="modl-content"> <div class="modl-header"> <h5 class="modl-title" id="exampleModlLabel">Modl title</h5> <button type="button" class="close" data-dismiss="modl" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modl-body"> ... </div> <div class="modl-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modl">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> </div> </div>
Tips To Use Bootstrap
Use the class accurately for the requirement.
Try to be specific while selecting the values and fields.
Make sure it should be less in size and competence.
Bootstrap helps in making the content more charming with less code.
Conclusion
Bootstrap combines with HTML and CSS-based design templates and other javascript plugins. Its CSS can operate on multiple devices like tablets, phones, and desktops. It is being generally used for developing web applications. It is getting famous among developers because of its usage and the flexibility provided. The individual who knows HTML and CSS can easily work on bootstrap.