If I have an element like this one for example:
<input type="text" class="someTextBox" id="someTextBoxID" />
… does it matter if class is placed before id? If I had to guess I’d say no, but then again I wonder if there are any rules regarding that.
There are no rules for the ordering of attributes in HTML.
You can put them in any order you like.