The Attribute "id" provides an handle to an element, class can't override id attribute,
but can add additional properties. The class attribute can be used as group, but
JQuery  can use id attribute as a handle to alter other attribute values, $("[id=x3]").removeClass('x3');
This example shows the followings:
1:class(F=x1):
  class(T=Red)
2 class(T=Blue):
3:class(T=Red):
  class(T=Blue)
4:class(T=Blue):
   id(T=Gray)
5:id (T=Orange):
  class(T=Blue)