HTML <textarea>プレースホルダー属性
例
プレースホルダーテキストのあるテキスト領域:
<textarea placeholder="Describe yourself here..."></textarea>
定義と使用法
このplaceholder
属性は、テキスト領域の期待値を説明する短いヒントを指定します。
ユーザーが値を入力する前に、短いヒントがテキスト領域に表示されます。
ブラウザのサポート
表の数字は、属性を完全にサポートする最初のブラウザーバージョンを示しています。
Attribute | |||||
---|---|---|---|---|---|
placeholder | Yes | 10.0 | 4.0 | 5.0 | 11.5 |
構文
<textarea placeholder="text">
属性値
Value | Description |
---|---|
text | Specifies a short hint that describes the expected value of the text area |
❮HTML<textarea>タグ