HTML Tutorial

Link Element

The link tag defines a relationship and connection between an HTML page and an external resource. Typically, the resource is a stylesheet (CSS).

Attributes

Attribute Value Description
rel stylesheet
icon
Describes the kind of relationship.
type text/css
image/png
Describes the MIME type. In other words, this defines the type of resource that is being connected.
href A path to the external resource.  

Example

The code that follows links the document to a CSS page as well as a favicon (a small icon that appears on the tab or top-toolbar for certain browsers).

<html>
	<head>
		...
		<link> rel="stylesheet" type="text/css" href="global.css" />
		<link> rel="icon" type="image/png" href="favicon.png" />
	</head>
	...
</html>
Link Example