Is rel first or href and why?

Uploading: codecademy confusion.PNG…
Line 6 I think is line 5 and with the second snip I still have confusion about the order of commands is rel first or href and why?

HTML elements are objects, meaning key-value pairs in a container. Their order is inconsequentional as they (objects) are unordered. That means the attributes (key-value pairs) can be written in any order.

It will eventually come down to consistency on your part, or if you find yourself in a collaborative group, it will usually be dictated by a style guide.

1 Like

FTR: I personally put the REL before the HREF, followed by a TITLE that describes the link, in brief terms.

<link rel="author" href="#mysiteURL" title="Site Author">

Not sure about today’s browsers but in the past, Opera created links in the browser navigation that corresponded with the relative links in the HEAD.

  • Home
  • Author
  • Next
  • Previous

and so on. It was a cool feature in the day but Opera didn’t get a lot of traction in North America. I would love to hear that the NA vendors have adopted such an implementation, though I’m not developing web sites any longer. As I said, it is a cool feature for a browser to have.

same i too,

<link rel="stylesheet" href="#">