Bootstrap supports all type of HTML5 inputs
Basic input
<h2> Basic input</h2> <div class="container"> <div class="form-group"> Name <input type="text" class="form-control" id="user"/> Password <input type="password" class="form-control id="password"/> </div> </div>
In the above code snippet we have defined the input, we have value class attribute as container
to create the input in the container and we are having the value of class attribute form-group
in the div, we have created input type with text and password using class attribute form-control
with id as user and password
output
We can create text area in bootstrap by using following
<h2> Bootstrap text area</h2> <div class="container"> <div class="form-group"> <textarea class="form-control rows="3"></textarea> </div> </div>
container
in the divform-group
to create textarea using class attribute form-control
with rows 3 which defines the textarea with 3 rowsoutput
It is used to select the items in many number of options
<h2>Bootstrap checkbox</h2> <div class="container"> <div class="checkbox"> <label><input type="checkbox" value="1">TechFunda</label> </div> <div class="checkbox"> <label><input type="checkbox" value="2">DotNetFunda</label> </div> <div class="checkbox"> <label><input type="checkbox" value="3">ITFunda</label> </div> </div>
checkbox
in the div with three different values TechFunda, DotNetFunda and ITFunda output
We can create radio button using bootstrap, radio button is used to select the single item among different buttons
<h2>Bootstrap radio button</h2>
<div class="container">
<div class="radio">
<label><input type="radio" name="optradio">TechFunda</label>
</div>
<div class="radio">
<label><input type="radio" name="optradio">DotNetFunda</label>
</div>
<div class="radio">
<label><input type="radio" name="optradio">ITFunda</label>
</div>
</div>
radio
with input type as radio and name as optradio in the label output
It is used to create the list values
<h2>Bootstrap select list</h2> <div class="form-group"> <label for="select">Select list:</label> <select class="form-control" id="select"> <option>TechFunda</option> <option>DotNetFunda</option> <option>ITFunda</option> <option>KidsFunda</option> </select> </div>
form-group
in the div select
with value select list form-control
in the select element with id =select with the option values TechFunda, DotNetFunda, ITFunda, KidsFunda output