1. Not required according to the spec - if a boolean attribute is present, it's true; if it's not, it's false.
  2. The order follows what the most common attributes are. Almost every element will have class, most will have an id, some will have data attributes, etc. This makes it easier to mentally parse.