Question and answer is powered by AnsPress.io
I have a HTML page and I have created a HTML form with some input field. Here I want to add fonts icon inside in input field. The icon display with placeholder text. How can I add fonts icon inside in input field.
I am use fonts awesome cdn link on my web page.
To add fonts icon inside in input field use this code
input { font-family: 'FontAwesome'; }
apply this code and paste this code in style tag, for example
<style type="text/css"> input { font-family: 'FontAwesome'; } </style>
Create input field like that:
<input placeholder=" Username">