Welcome to WebmasterWorld Guest from 54.227.101.214

Forum Moderators: incrediBILL

Message Too Old, No Replies

<rel link or <link rel

Is <rel link or <link rel the same?

     

Ekon

11:42 am on Jan 25, 2014 (gmt 0)

Top Contributors Of The Month



Are the below same ?

<rel link="prev" href="example.com">

And

<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.

Fotiman

7:19 pm on Jan 25, 2014 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



<rel link="..."> is not valid, and should not work. The site you came across has an error.

lucy24

9:27 pm on Jan 25, 2014 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



The syntax is

<tag( attr="blahblah")( attr2="blahblah")( attr3="blahblah")>

"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.

Ekon

9:51 pm on Jan 25, 2014 (gmt 0)

Top Contributors Of The Month



Fotiman thanks for your help.

Lucy24 thanks for helping as well but honestly it went over my head , do you agree with Fotiman that

<rel link="prev" href="example.com"> is not valid ?

Many Thanks both of you.

lucy24

11:57 pm on Jan 25, 2014 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



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..."

Ekon

1:48 pm on Jan 26, 2014 (gmt 0)

Top Contributors Of The Month



Lucy Million Thanksssss for explaining it to a dumb ass person like me in such a simple way. You are genius......
 

Featured Threads

Hot Threads This Week

Hot Threads This Month