The placeholder attribute adds a hint to a <textarea> element.
The hint appears as muted text inside the control and specifies what data to enter.
A placeholder attribute on a <textarea> element.
The placeholder specifies the data the textarea expects.
<textarea rows="5" cols="75" placeholder="Please enter your feedback">
</textarea>
The placeholder attribute adds a hint to the textarea.
The hint appears as muted text inside the control. It disappears when the user starts entering data.
<textarea placeholder="text">
Value | Description |
---|---|
text | String value. The hint text. |
Here is when placeholder support started for each browser:
Chrome
|
1.0 | Sep 2008 |
Firefox
|
1.0 | Sep 2002 |
IE/Edge
|
1.0 | Aug 1995 |
Opera
|
1.0 | Jan 2006 |
Safari
|
1.0 | Jan 2003 |
Back to <textarea>