Whats the difference between max and maxlength?

Hello, does anybody know why we are taught to write minlength/ maxlength in text areas, when as min/max is understood and renders the same. Is it a better code? Does it render differently in other browsers if it is not written minlength/maxlength in text areas?

thank you

Hello py

Notice that minlenght/maxlength and min/max serve different purposes.

  1. Minlength and maxlength attributes specify the minimum and maximum number of characters allowed in the element.
  2. Min/max attribute specify the minimum and maximum value (we are talking about cyphers here) for an element.

According to w3fools, β€œthe max and min attributes works with the following input types: number, range, date, datetime, datetime-local, month, time and week.”

13 Likes