Reputation: 125
I have written the below textarea code and the placeholder is not working. I can't see the placeholder on the textarea box.
<textarea rows="4" cols="50" placeholder="Current Address">
</textarea>
Upvotes: 3
Views: 1340
Reputation: 38672
don't keep gap between start and end tag <textarea></textarea>
use this:
<textarea rows="4" cols="50" placeholder="Current Address"></textarea>
The reason that this works is because the newline character in between the textarea
tags is considered content, so it is placed inside the box instead of the placeholder.
Upvotes: 2