PDA

View Full Version : what is the correct order for listing attributes in the rel tag?


MrSnrub
10-11-2011, 10:19 AM
Which of the following is correct?


<link rel="stylesheet" type="text/css" href="/stylesheet.css" />
<link rel="stylesheet" href="/stylesheet.css" type="text/css" />
<link type="text/css" rel="stylesheet" href="/stylesheet.css" />
<link type="text/css" href="/stylesheet.css" rel="stylesheet" />
<link href="/stylesheet.css" type="text/css" rel="stylesheet" />
<link href="/stylesheet.css" rel="stylesheet" type="text/css" />


If all of them are technically correct, then which one is most likely to get the least number of "Why are you doing it this way?"s from professional web designers?

Corrosive
10-11-2011, 11:19 AM
I'd say the second one but they are all correct.

MrSnrub
10-12-2011, 10:29 AM
<link rel="stylesheet" href="/stylesheet.css" type="text/css" />

Can you elaborate why this one is preferred over the others?

domedia
10-12-2011, 12:55 PM
It makes no difference. I doubt any professional is going to ask you why you chose one method over the other. Attributes can come in whatever order.

If one method makes more sense to you than the other, use it. :)

Corrosive
10-12-2011, 01:21 PM
Can you elaborate why this one is preferred over the others?

No reason, that's just what I do. It's a habit thing :)