title: What happens if an invalid/nonstandard HTML attribute is used (for data)?
body: <p>I have a strange question. </p>
  
  <p>However, I want to know what happen when I use invalid attribute on html 5?</p>
  
  <p>For example, if I want to add a attr 'City' on a tag. </p>
  
  <pre><code>&lt;div data-city="etc"&gt;&lt;/div&gt; 
  </code></pre>
  
  <p>is the valid way. </p>
  
  <p>However, there is perfectly working fine with this way</p>
  
  <pre><code>&lt;div city="etc"&gt;&lt;/div&gt; 
  </code></pre>
  
  <p>I want to know what is the result that I should not use <code>'city'</code> instead of <code>'data-city'</code>??</p>
  
  <p>If only for use for passing data for javascrpit, can I use only 'city' in general??</p>
  
  <p>Thank you very much for your advice.</p>