HTML link type attribute
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>
<link rel="stylesheet" type="text/css" href="theme.css">
</head>
try it"
Browser Support
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