DEV Community

Discussion on: 10 HTML and CSS Good Practices πŸ…πŸ…

Collapse
 
silentimp profile image
SilentImp
  1. Attribute Order

Is there any research behind that?
Why this particular order?

Collapse
 
codewithtee profile image
Tabassum Khanum

It doesn't really matter what order we put attributes in an HTML tag, but an order can maintain a consistent pattern for readability reason. Its just a good practice to list HTML attribute in an order that reflects the fact that class names are the primary interface through which CSS and JavaScript select elements.