(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-66923408-1', 'auto'); ga('send', 'pageview');

About Document Links

When most people talk about links on the web, they mean anchor links — a link within the content of a page, which is anchored to a piece of text, or an image. But you can also define a link from one document to another, using the <link> tag. This allows you to import the contents of a script or resource, such as a stylesheet, into your HTML document. You can then control the appearance or behavior of all pages by altering the content in your linked resource page.

<link rel="stylesheet" type="text/css" href="http://mysite.com/styles.css"> 

The <link> element can also be used to link different versions of a page together. This is helpful if you have multiple translations of the same content. The following example describes an alternate version in Japanese, using the ISO 639-1 language code.

<link rel="alternate" hreflang="ja" href="http://mysite.com/es.php" rel="nofollow"> 

A HTML document can have multiple <link> elements to load different script or page types. All of these <link> elements must be placed in the <head> section of the HTML document.

Claire Broadley
Claire is seasoned technical writer, editor, and HTML enthusiast. She writes for HTML.com and runs a content agency, Red Robot Media.

Browser Support for link

All
All
All
All
All
All
shares