---
title: "Change an HTML input's placeholder color with CSS"  
description: "Change an HTML input's placeholder color with CSS"  
author: "Revati S Misra"  
published: 2023-04-24  
updated: 2023-04-25  
canonical: https://www.mindstick.com/forum/157983/change-an-html-input-s-placeholder-color-with-css  
category: "html"  
tags: ["html", "stylesheet", "css"]  
reading_time: 1 minute  

---

# Change an HTML input's placeholder color with CSS

Change an [HTML input](https://www.mindstick.com/forum/157343/how-to-prevent-a-user-from-adding-same-character-over-and-over-in-html-input-box-using-javascript)'s [placeholder color](https://www.mindstick.com/forum/159722/how-to-change-an-html-input-s-placeholder-color-with-css) with [CSS](https://www.mindstick.com/forum/514/background-gradient-ie7-css-problem)

## Replies

### Reply by Aryan Kumar

You can change the [color](https://www.mindstick.com/articles/77/how-to-split-form-background-color-in-c-sharp) of an [HTML](https://www.mindstick.com/articles/1530/design-a-simple-stylish-calculator-using-html-css-and-javascript) [input](https://www.mindstick.com/forum/159209/how-can-i-read-convert-an-input-stream-into-a-string-in-java)'s [placeholder](https://www.mindstick.com/forum/1519/how-do-i-remove-a-listbox-new-item-placeholder) text with CSS by using the ::placeholder pseudo-element. Here's an example:

```html
<input type="text" placeholder="Enter your text here">
```

```css
/* Change the color of the input's placeholder text */
input::placeholder {
 color: red;
}
```

In the above example, the placeholder text of the input will be displayed in red color. You can replace "red" with any other color of your choice. Note that not all browsers support this pseudo-element, so it's a good idea to test your code in different browsers to ensure consistent behavior.


---

Original Source: https://www.mindstick.com/forum/157983/change-an-html-input-s-placeholder-color-with-css

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
