Msg#: 4640074 posted 11:42 am on Jan 25, 2014 (gmt 0)
Are the below same ?
<rel link="prev" href="example.com">
<link rel=”prev” href=”example.com”>
I have seen everywhere <link rel="prev" href="example.com" being used but I came across a site which is using <rel link="prev" href="example.com"> and I wanted to know the difference between them , will this <rel link="prev" be creating any issues for the site.
"link" is a tag. "rel" is an attribute. Some attributes (id, title) are universal or nearly so. Others can only be used with particular tags, like link + rel here. Some attributes are mandatory (an "img" has to give a "src" or you won't get anywhere). Others are optional.
Msg#: 4640074 posted 11:57 pm on Jan 25, 2014 (gmt 0)
Completely invalid. You can try the HTML validator [validator.w3.org] in Direct Input > HTML Fragment mode. Those few words <rel link="prev" href="example.com"> net you three separate errors :)
there is no attribute "LINK" there is no attribute "HREF" element "REL" undefined
Yes, in that order. "These attributes don't exist, and by the way they're attached to an element we've never heard of." (The attribute "href" of course does exist-- but only if it's attached to an element that the validator is familar with.)
If you turn it around to <link rel="prev" href="example.com"> the validator is happy. Well, not completely happy, because the <link> element is only allowed in a <head> section ... and then if you wrap the line in <head> </head> the validator throws even more errors. But at that point it's just funning with you ;)
Unlike some validator errors, here I don't see how the browser would even know what to do with "rel link..."