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 place Font Awesome icon to input field ?
- Design a form component which takes input from its user and displays a form
- How to replace dropdown-toggle icon with another default icon in Bootstrap ?
- How to put a responsive clear button inside HTML input text field ?
- How to perform click-and-hold operation inside an element using jQuery ?
- How to get access to the containing form of an input?
- HTML | DOM Input URL form Property
- HTML | <input> form Attribute
- HTML | DOM Input Submit form Property
- HTML | DOM Input Month form Property
- HTML | DOM Input Time form Property
- HTML | DOM Input Week form Property
- HTML | DOM Input Email form Property
- HTML | DOM Input Image 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 email@example.com. 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.