HTML <link> with rel Attribute
HTML <link> with rel Attribute
The rel
attribute specifies the relationship between the current document and the linked document.
alternate
The alternate attribute value provides a link to an alternate version of the document.
Note: This attribute works only on firefox.
Example
Attribute Values
Value | Explanation |
---|---|
alternate | Provides a link to an alternate version of the document. |
author | Provides a link to the author of the current document. |
dns-prefetch | Performs DNS lookup on a page in the background while the user is browsing. |
help | Provides a link to a help document. |
icon | Specifies the favicon of a webpage. |
license | Provides a link to copyright information for the document. |
next | Provides a link to the next document in the series. |
pingback | Provides the URL of a webpage which links to your webpage. |
preconnect | Setup an early connection to eliminate the roundtrip latency. |
prefetch | Prefetch the linked document by utilizing the browser's idle time. |
preload | Renders the specific file eg) image, javascript, css. |
prerender | Renders the entire file of the linked document in the background. |
prev | Provides a link to the Previous document in the series. |
search | Provides the link to the document, which performs search operation within your website. |
stylesheet | Imports a style sheet. |
author
The author attribute value provides a link to the author of the current document.
Example
dns-prefetch
The dns-prefetch attribute value will prefetch the DNS information for that domain specified in the href attribute before it is actually needed.
Example
help
The help attribute value provides a link to a help document.
Example
icon
The icon attribute value specifies the favicon of a webpage.
Example
license
The license attribute value provides a link to copyright information for the document.
Example
next
The next attribute value provides a link to the next document in the series.
Example
pingback
The pingback attribute value provides the URL of a webpage which links to your webpage.
Example
preconnect
The preconnect attribute value is used to fetch the required resources in advance. Preconnect allows the browser to setup an early connection before an HTTP request actually sent to the server. This includes the DNS lookup, TCP handshake, and optional TLS negotiation. This is turn will elminates roundtrip latency, which saves 200ms to 700ms.
Note: subdomain should be treated as seperate website.
Example
prefetch
The prefetch attribute value allows the browser the fetch the resource in the background while the user is browsing and store the resource in browser's cache,assuming that the user may request them.
Example
preload
The preload attribute value is little bit different from prefetch. prefetch load the resource for next navigation (low priority) whereas preload loads the resource for current navigation(high priority).
Example
prerender
The prerender attribute value is much similar to preload, preload renders specific file such as javascript,css,image etc, whereas prerender renders the entire page in the background which includes javascript, css, image etc.
Example
prev
The prev attribute value provides a link to the Previous document in the series.
Example
search
The search attribute value provides the link to the document, which performs search operation within your website.
Example
stylesheet
The stylesheet attribute value imports a style sheet.
Example
Reminder
Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in HTML.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.