Latest web development tutorials

HTML link type attribute

HTML link Tag Reference HTML <link> tag

Examples

In the following example, type attribute indicates the document is linked to an external style sheet:

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

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the type attribute.


Definition and Usage

type attribute specifies the MIME type of the linked document / resources.

Only when the href attribute is set to use the property.

<Link> tag is commonly used MIME type "text / css", which provides style sheet.


Differences between HTML 4.01 and HTML5

no.


grammar

<link type="MIME_type">

Property Value

描述
MIME_type 被链接文档的 MIME 类型。
请参阅 IANA MIME 类型 ,获得标准 MIME 类型的完整列表。


HTML link Tag Reference HTML <link> tag