Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add default value for html <textarea>? [closed]

Tags:

html

textarea

I want to set a default value for my html <textarea>. I read from a material that to add default value you have to do something like <textarea>This is default text</textarea>. I did that but it doesn't work. What's the right thing to do?

like image 255
Newbie Coder Avatar asked May 15 '11 07:05

Newbie Coder


People also ask

Can textarea have default value?

The DOM Textarea defaultValue Property is used to set or return the default value of the textarea field. Syntax: It is used to return the defaultValue property.

What is the default value of textarea HTML?

Note: The default value of a text area is the text between the <textarea> and </textarea> tags.


1 Answers

Here is my jsFiddle example. this works fine:

<textarea name='awesome'>Default value</textarea> 
like image 164
Andrew Jackman Avatar answered Oct 10 '22 03:10

Andrew Jackman