- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use the Glyphicons icons in Bootstrap
To use the Glyphicons icon in Bootstrap, use the following code just about anywhere in your code. Leave a space between the icon and text for proper padding like −
Example
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script src = "/scripts/jquery.min.js"></script> <script src = "/bootstrap/js/bootstrap.min.js"></script> </head> <body> <span class = "glyphicon glyphicon-user"></span> </body> </html>
You can try to run the following code to implement the Glyphicons icons:
Example
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script src = "/scripts/jquery.min.js"></script> <script src = "/bootstrap/js/bootstrap.min.js"></script> </head> <body> <p>The following are the icons:</p> <p> <button type = "button" class = "btn btn-default"> <span class = "glyphicon glyphicon-print"></span> </button> <button type = "button" class = "btn btn-default"> <span class = "glyphicon glyphicon-search"></span> </button> <button type = "button" class = "btn btn-default"> <span class = "glyphicon glyphicon-download"></span> </button> </p> </body> </html>
- Related Articles
- Bootstrap Glyphicons
- Add feedback icons for inputs with Bootstrap
- How to use icons to make an animated effect with JavaScript?
- How to add icons in the button in HTML?
- How to use Bootstrap Popover Plugins
- How to use Bootstrap Alert Plugins
- How to use Bootstrap Dropdown Plugins
- How to use Bootstrap Button Plugins
- How to use Bootstrap Collapse Plugins
- How to use Bootstrap Tab Plugins
- How to use Bootstrap Tooltip Plugins
- How to use Bootstrap Scrollspy Plugins
- How to use Bootstrap Carousel Plugins
- How to use Bootstrap Affix Plugins
- How to create a form with icons using CSS?

Advertisements