问题
Should the attributes of any particular HTML tag be listed in a specific order? Is there a convention for the order? For example, I have the following image tag in an HTML strict page...
<img src="http://example.com/media/graphics/border_bottom.png" class="border" height="5px" width="600px" alt="Lower Border" />
Should the src be listed first, or the height, or the width, etc? What is the proper order?
Thanks in advance!
回答1:
No there isn't, but anyway you should follow make your own standard and follow it
回答2:
Nope not at all, the order doesn't matter. I tend to put attributes in the same order in my pages, just for consistency but it's isn't needed
来源:https://stackoverflow.com/questions/3817542/is-there-a-specific-order-that-http-tag-attributes-should-be-listed-in