The link element can be placed only in the document's head section and it is used to define a link to external source.

This element has no content; it only expresses document relationship(s) information.

Depending on the purpose of the link element and the browser rendering it, the element's results might be presented in different ways such as a drop down menu, etc.

Links are also used to inform search engines about variety of things, such as links to different media (i.e. printing version of the page) or a URI to the version of document written in another language.

The most widely used and browser supported usage of the link element is a link to external style sheets file.

Link is an empty element, therefore the closing tag is forbidden.

Syntax:

<link rel="stylesheet" type="text/css" href="URI" />

Attributes:

Example

HTML link element:

 

›› go to examples ››