What order should attributes be in?

Is there a common practice of ordering attributes or should I just create my own order and stick to it through the whole file?

I think this stackoverflow question answers it nicely:

https://stackoverflow.com/questions/2720618/valid-order-for-attributes-of-input-type-tag

not the accepted answer, but the second high one (with higher upvotes)

13 Likes

I had already read that answer before posting my question, but I wanted to see if people in this forum thought about it differently.

Now that I see that you don’t, I’ll follow that piece of advice confidently.

Thanks!

1 Like

Stackoverflow is generally very trustworthy. I do also agree with the answer in this case (just like many times before)

2 Likes

Nice to know. I will rely more on Stackoverflow for future doubts.

yes, i prefer stackoverflow and MDN over w3schools. see w3fools

2 Likes

First time i see this w3fools page. Thank you for pointing this out

thanks a lot, it helps a lot.