Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is <LINK rel="alternate" type="text/html" href=""> doing?

Tags:

html

I am working in a project fastfly where I found above tag. I did a little research but couldn't get clear answer. Any body can describe what exactly this does?

like image 297
Ramesh Avatar asked Dec 15 '13 17:12

Ramesh


People also ask

What does link href do in HTML?

Definition and Usage The href attribute specifies the URL of the page the link goes to. If the href attribute is not present, the <a> tag will not be a hyperlink. Tip: You can use href="#top" or href="#" to link to the top of the current page!

What is link rel and href?

rel is short for relation. It specifies the relation between the tag and href . href stands for hypertext reference. It's the source of the file used by the tag. You can use both not only when connecting an external css file, also for using <a> tags,for a regular hyperlink.

What does link rel stylesheet do?

When used on a <link rel="stylesheet"> it defines a default or an alternate stylesheet. This attribute is used to define the type of the content linked to. The value of the attribute should be a MIME type such as text/html, text/css, and so on.

What is alternate link?

Alternate links provide additional connections. At IPL time, global resource serialization uses one link as the primary connection and marks any other links as alternates. Alternate links provide two very important benefits. If alternate links exist, you can use ring acceleration during normal ring processing.


2 Answers

Meaning of each part according to w3c:

rel: Set of space-separated tokens. Specifies a list of tokens that specify the relationship between the document containing the link and the destination indicated by the link. Two categories of links can be created using the link element -- Links to external resources and hyperlinks.

alternate: A type of hyperlink that gives alternate representations of the current document.

type: A valid MIME type that destination of the hyperlink. Gives the MIME type of the linked resource.

So basically the tag gives a reference to an alternate location of your document that might be in another language. In your case, what the link is doing, is that it is showing the same site with slight modifications, probably meant for people of a different geographical location (I'm not sure about this, but yes, it's the modified version of the same site.)

PS: Avoid posting links of websites in your questions, try posting code or a fiddle instead. The problem is that most websites undergo change over time, so the question becomes redundant for future reference.

like image 70
Ranveer Avatar answered Oct 03 '22 19:10

Ranveer


Link rel=alternate tells the user (search engines) that there is an other URL with the same content but in an other form (eg. language, mobile, ...).

Source : MDN Link types

like image 37
beardhatcode Avatar answered Oct 03 '22 20:10

beardhatcode