Is there any reason that relates to parsing time, layout, rendering time, style application, etc. to have HTML attributes in a certain (or consistent) order?
The order of HTML attributes does not improve a page's compressibility significantly, and maintaining some order can make the markup easier for human readers to figure out (e.g. putting id
first, starting <input>
s with type
, putting boolean attributes at the end of an opening tag) but I'd like to know if there are any performance reasons to consider attribute order.