In my text area, I should be able to enter only 72 characters per line. If I use, cols property set to 72, it is allowing more or less number of characters depending on character width.
Can any one help how to do it?
Note − By default, we can enter data in a textarea upto 5,24,288 characters. In some cases, there is a need of putting a limit on the size of characters that can be typed in a textarea. So in that case, we can use maxlength attribute to control the number of characters entered in a textarea.
We can define the visible width and height of a TextArea either using the cols and rows attributes or the style properties: width and height , but we cannot set a limit to the number of characters or the number of lines for the text entered into the TextArea by using HTML or CSS.
Duplicate of Textarea Limit characters per line Jquery or Javascript
<TEXTAREA NAME="HARD" COLS="72" ROWS="5" WRAP="HARD">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With