how do you add a search icon, inside of a placeholder?

I am just wanting to add a font awesome icon inside a placeholder. i have tried using the Unicode inside the placeholder but that doesn’t work. i have also tried using pseudo elements but still does not work.

<input type="text"  name="search bar"  placeholder="search">

width: 4%;
position: absolute;
right: 188px;
top: 24px;
background-colour: #000000;

    colour: antique white;

>Solution :

<link href="" rel="stylesheet"/>
<input style="font-family: FontAwesome;" placeholder='&#xf002 search' />

Leave a Reply