Id AND class in a tag, does one have to come before the other?

are
<div id="best_friend" class="friend"></div>
and
<div class="friend" id="best_friend"></div>
both acceptable and equivalent?

Both are acceptable, the order of attributes doesn’t matter (class and id are both attributes)