size
is "how big" it should be on screen. max-length
is the maximum number of characters the browser should allow to be entered into a field. They're not at all related. You could have have size = 50 kajillion, max-length=1
if you wanted to be a sadistic page designer.