Reputation: 354
Please consider the following HTML code fragment:
<body bgcolor = "red" text="black">
In this case, bgcolor and text are attributes of the tag body. I claim that the order the attributes appear in, does not matter. Do I have that right?
I understand that this can be done via CSS and that is the preferred way of doing it, but I am trying to understand the fine point of HTML. I also want to understand if the order of the attributes matters for any tags.
Thanks Bob
Upvotes: 2
Views: 1050
Reputation: 870
it doesn't really matter what order you put attributes in an HTML tag, but you carefully maintain a consistent pattern for readability/debugging reasons.
Upvotes: 3
Reputation: 4991
bgcolor
and text
don't interfere with each other so the order is not important.
In general, the order of html attributes is not important.
Upvotes: 0