HTML textarea placeholder attribute
Examples
With placeholder text in the text area:
<textarea placeholder="描述信息...">
</textarea>
</textarea>
try it"
Browser Support
Internet Explorer 10, Firefox, Opera, Chrome and Safari support the placeholder attribute.
Note: 9 and earlier versions of Internet Explorer does not support the placeholder attribute <textarea> tag.
Definition and Usage
placeholder attribute specifies a brief reminder that describes the expected value of the text area.
When the text area is empty, and when the field gets the focus and then loses focus, text area displays the prompt.
Differences between HTML 4.01 and HTML5
placeholder attribute is new in HTML5 attributes.
grammar
<textarea placeholder=" text ">
Property Value
值 | 描述 |
---|---|
text | 规定一个简短的提示,描述文本区域的期望值。 |
HTML <textarea> tag