Note – for single line test use <input type=”text” not textarea!

  <textarea name="MyTextArea" style="width: 300px; height:120px;">Default text</textarea>

  <textarea name="MyTextArea" cols="50" rows="2">Default text</textarea>

Including previously submitted text:
  <textarea name="MyTextArea" style="width: 300px; height:120px;"><?= $_POST["MyTextArea"];?></textarea>

Max length

<textarea maxlength="50">

Background text

Text that vanished when you start typing into the box

  <textarea placeholder="Write your name here" ></textarea>
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published. Required fields are marked *