title: What are the consequences of using percentage for width,height attributes of an img element?
body: <p>Excuse me if it is a dumb question, but the fact is that I do not have any idea about it.</p>
  
  <p>I was searching to find some way to position an <code>img</code> element in <code>HTML</code> pages that noticed this sentence from w3schools.com (It is speaking of setting <code>width</code> in an <code>img</code> element):</p>
  
  <p><strong>In HTML 4.01, the width could be defined in pixels or in % of the containing element. In HTML5, the value must be in pixels.</strong></p>
  
  <p>It says that the width attribute <strong>must</strong> be set in pixels not in percent. But solving my problem was far more easier when using percentage. I used the percent and checked the result in the latest versions of <code>FireFox</code>, <code>Chrome</code>, and <code>IE</code>. All were OK.</p>
  
  <p>Now, my question is that what are bad consequences of using percent (despite HTML5 directives) while it actually works fine? What should we care about and what we shouldn't?</p>
  
  <p>Thank you very much for reading and clarifying the situation.</p>