How to add default value for html <textarea>?

Newbie Coder picture Newbie Coder · May 15, 2011 · Viewed 704.5k times · Source

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?

Answer

Andrew Jackman picture Andrew Jackman · May 15, 2011

Here is my jsFiddle example. this works fine:

<textarea name='awesome'>Default value</textarea>