title: How should I code my forms so that I can take advantage of autofill?
body: <blockquote>
    <p>Every login dialog you create should be tested to work with the default password managers in …</p>
  </blockquote>
  
  <p>-- Jeff Atwood, <a href="http://blog.codinghorror.com/the-god-login/" rel="nofollow">http://blog.codinghorror.com/the-god-login/</a></p>
  
  <p>It seems like many sites have problems with autofill and my google foo did not find me any sites that define how to do this correctly.</p>
  
  <p>I imagine there is some way to id or name these fields so that all of the password managers recognize them. In fact I imagine we can take this beyond just username and password. I'd like to know how to code my html so that browsers and tools like lastpass will be able to autofill the following fields.</p>
  
  <ul>
  <li>email</li>
  <li>username</li>
  <li><p>password</p>
  
  <ul>
  <li>password confirmation</li>
  </ul></li>
  <li><p>Name</p>
  
  <ul>
  <li>first,  last, middle</li>
  </ul></li>
  <li><p>phone number</p></li>
  <li><p>address</p>
  
  <ul>
  <li>street address line 1, 2, 3</li>
  <li>city, state (subcountry), postalcode, country</li>
  </ul></li>
  <li><p>credit card</p>
  
  <ul>
  <li>full name</li>
  <li>account number</li>
  <li>security code</li>
  <li>expiration date</li>
  </ul></li>
  </ul>