By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

HTML Link Tag

Reference on the HTML Link Tag. Including its useful example, and a list of the allowed attributes.

Edited: 2014-12-28 05:49

The Link element of HTML is used to link external files with a document.

Its most common use, is perhaps, to link external CSS StyleSheets. But it can also be used to link to different translations of a document.


AttrsOther AttributesCommon, I18n, Event
CharsetCharacter encodingCharacter encoding of resource
hrefURIURI for linked resource
hreflangLanguage Codelanguage of resource, if href is used.
typeMedia TypeThe Content Type of the resource.
relLink TypesSpace-separated list of forward links
revLink TypesSpace-separated list of reverse links
mediaMedia DescriptorEither a single, or comma-separated list. I.e. "screen,print"


<html lang="en">

    <title>Using the HTML Link Tag</title>
    <link rel="stylesheet" type="text/css" href="StyleSheet.css">

    <p>How to add a Stylesheet using Link</p>