To add icon inside the input element the <i> tag and <span> tag are used widely to add icons on the webpages. To add any icons on the webpages or in some specific area, it needs the fontawesome link inside the head tag. The fontawesome icon can be placed by using the fa prefix before the icon’s name.
fontawesome link: https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css
Note: No downloading or installation is required.
- How to enable/disable all input controls inside a form element using jQuery ?
- How to replace dropdown-toggle icon with another default icon in Bootstrap ?
- Design a form component which takes input from its user and displays a form
- How to get access to the containing form of an input?
- How to perform click-and-hold operation inside an element using jQuery ?
- HTML | <input> form Attribute
- HTML | DOM Input URL form Property
- HTML | DOM Input Color form Property
- HTML | DOM Input Week form Property
- HTML | DOM Input Range form Property
- HTML | DOM Input Text form Property
- HTML | DOM Input Image form Property
- HTML | DOM Input Password form Property
- HTML | DOM Input Checkbox form Property
- HTML | DOM Input Radio form Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.