Add Icon to Submit Button in Bootstrap- Sometimes we need submit button with some specific icon in bootstrap. It is very easy and simple to add the icon in bootstrap button. Here in this tutorial we are going to explain how you can add icon to the bootstrap button. You can also use our online editor to edit and try the example code.
How to Add Icon to Submit Button in Bootstrap ?
You can add icon to submit button by adding the icon class in the <i> tag. Add the icon class in <i> tag as below –
Add Icon to Submit Button in Bootstrap : Twitter
<button type="submit" class="btn btn-primary"> <i class="glyphicon glyphicon-search"></i> Search </button> |
If you run the above example it will produce output something like this –
Tip : You can also use the span tag instead of i tag. There is no hard and fast rule to use i tagso you are free to use any one as per your convenience.