homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

<rel link or <link rel
Is <rel link or <link rel the same?

 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.



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

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


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

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.


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

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.


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


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

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

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved