How to Add Icon in Placeholder in Html

In this tutorial, we will learn how to add a prefix icon to an input type field using HTML and CSS. A prefix icon is a small image that appears before the text input, such as a dollar sign for a currency field or a magnifying glass for a search field. Adding a prefix icon can make your input fields more attractive. 

Profile Photo

Abhishek Yadav (SD) SDE of FAI

Feedback

written
Profile Photo

Anil Kumar (Expert) Coding Expert of FAI

Feeback

reviewed
Profile Photo
Mar 02, 2024 04:03 AM Last Updated
updated

Add Icon in Placeholder Example

Copied to Clipboard
Run

Pasted Image

Ad