This website may use cookies. More info. That's Fine x
Welcome Login

link tag


link tag defines the relationship between a document and an external resource.

The link tag is most used to link to style sheets.

Note: <link> element is an empty element, it contains attributes only.

Note2: This element goes only in the head section, but it can appear any number of times.

Note3: In html the <link> tag has no end tag.  In xhtml, the <link> tag must be properly closed.

Eg:

<head>
    <link rel="stylesheet" type="text/css" href="main.css">
</head>

 

 

Attributes:

attribute   value 	       description

charset     char_encoding      specifies the character encoding of the linked document

href 	    url                specifies the location of the linked document

hreflang    language_code      specifies the language of the text in the linked document

media       media_query        specifies on what device the linked document will be displayed

rel 	    includes:          Required. Specifies the relationship between the current document and the linked document
            stylesheet
            etc.
 
target 	    _blank             specifies where the linked document is to be loaded
            _self
            _top
            _parent
            frame_name 	 

type 	    MIME_type          specifies the mime type of the linked document

 

 

For more information, see here.


Created on: Friday, November 2, 2012 by Andrew Sin