HTML <textarea> placeholder Attribute
Example
<form action="action.php">
<textarea placeholder="please enter text here..." name="textareaText"></textarea>
<br><br>
<input type="submit" value="Submit">
</form>
Meaning
The placeholder attribute specifies a short bit of text that is used to help the user figure out what type of information to fill in for a form control.
Notes:
- The text will be placed in the field and cleared upon focus.
- Placeholders should only be used to show an example of the type of data that should be entered into a form; they are not a substitute for a proper
<label>element tied to the input.
Standard Syntax
<textarea placeholder="text">...</textarea>
Advertisement
Attribute Values
| Value | Description |
|---|---|
| text | Specifies a sample value or a brief description of the expected format. |