Category: javascript
bootstrap buttons forms and tables
Published on 30 Sep 2026
Explanation
Bootstrap provides predefined button styles for common actions.
Code:
<button class="btn btn-primary">Save</button> <button class="btn btn-success">Submit</button> <button class="btn btn-danger">Delete</button>
Explanation
Bootstrap form classes provide consistent styling for inputs, labels, selects, and textareas.
Code:
<div class="mb-3"> <label class="form-label">Email</label> <input type="email" class="form-control"> </div>
Explanation
Bootstrap tables provide responsive and styled tabular data.
Code:
<table class="table table-striped">
<thead>
<tr><th>Name</th><th>Email</th></tr>
</thead>
<tbody>
<tr><td>Praveen</td><td>p@example.com</td></tr>
</tbody>
</table>
Explanation
Table variants can highlight important rows or provide hover effects.
Code:
<table class="table table-hover">
<tr class="table-success">
<td>Payment Successful</td>
</tr>
</table>
Explanation
Bootstrap validation classes can visually indicate valid and invalid form fields.
Code:
<input class="form-control is-valid"> <input class="form-control is-invalid"> <div class="invalid-feedback"> Email is required. </div>