html - How can I print a dollar symbol inside(or before) the input box? -


the field below retrieves hourly pay rate user input. how can display "$" sign inside (or before) input field user types in hourly pay rate?

<tr> <td>hourly pay rate</td> <td><input type = "number" name = "hpr" min="0" step="0.01"  required></td> </tr> 

not sure asking :

first 1 put "$"sign before input type

<tr> <td>hourly pay rate</td> <td>$<input type = "number" name = "hpr" min="0" step="0.01"  required></td> </tr> 

second 1 put "$" inside input type , disappear once user start typing.

<tr> <td>hourly pay rate</td> <td><input type = "number" placeholder="$" name = "hpr" min="0" step="0.01"  required></td> </tr> 

Comments