I am little bit confused about the difference between the maxlength and the size attribute.
maxlength
size
Max length refers to the maximum possible length of the input string. Size refers to the size of the input itself.