Textarea cursor not starting from beginning

Html

Html Problem Overview


I have a <textarea> in HTML. When I put cursor in it, it's not starting from the beginning, but is blinking in middle.

HTML
<TD width="21%">
    <textarea class="txtarea" style="height:30px;" rows="3" name="Text" Id="Text" value=""> </textarea>
</TD>
CSS
.txtarea{
    border-right: #646464 ;
    border-top: #646464;
    border-left: #646464;
    border-bottom: #646464;
    width:100%;
    background: #ffffcc;
}

Html Solutions


Solution 1 - Html

<textarea class="txtarea" style="height:30px;" rows="3" name="Text" Id="Text" value=""> </textarea>

What you have is a space between <textarea> and </textarea> tags.

Solution 2 - Html

Textarea's opening and closing tag must be in same line because Whatever in between textarea tag it will considered as "value" of textarea. Now for below code placeholder will also shown as expected.

<textarea
  placeholder="Enter text here" 
  class="txtarea"
  style="height:30px;"
  rows="3"
  name="Text"
  id="text"
></textarea>

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser1495475View Question on Stackoverflow
Solution 1 - HtmlTomView Answer on Stackoverflow
Solution 2 - HtmlMohammad ZaidView Answer on Stackoverflow