How to Add a Default Value to HTML textarea Element?

Unlike the HTML <input> element, the <textarea> element does not have a value attribute to set the default value. To do that on an HTML <textarea> element, the value must be added between the opening and closing tags, for example, like so:

<textarea>Default value goes here...</textarea>

The <textarea> element supports multi-line content, therefore, any line-breaks (or whitespaces) added between the opening and closing tags would be interpreted as is. For example, the following would set the default value on the <textarea> element split over three lines:

Line 1
Line 2
Line 3

Hope you found this post useful. It was published . Please show your love and support by sharing this post.