skip to Main Content

Change an HTML input’s placeholder color with CSS

To change the color of an HTML input's placeholder text using CSS, you can use the ::placeholder pseudo-element along with the color property. Here's an example: <input type="text" placeholder="Enter your name" class="my-input"> .my-input::placeholder { color: red; /* Set the desired…

Back To Top