TEXTAREA Default Value

TEXTAREA Default Value

TL;DR Summary – TEXTAREA Default Value

Setting textarea default value is different than setting default value on an input element where you do something like this:

<input value=”this is default value” />

When dealing with  textarea you have to put the value between the tags. And size of textarea is defined by rows and cols attribures.

Full code for the image above is here:

<style>
  body { 
    background-color: orangered; 
    padding-top: 300px;
    font-size: 100px; 
    text-align: center;
  }
  textarea {
    font-size: 40px;
  }
</style>

<textarea rows="4" cols="50">
This is some default value!
</textarea>

And that’s all there is to setting default value to a textarea HTML element.

And if you want to learn how to raise your salary then check out this page:

raise salary by 30%

Until next time,
Will
Senior Software Developer