HTML-Stil Eigenschaft type
Beispiele
Mit dem type-Attribut in <style> -Tag:
<style type="text/css">
h1 {color:red;}
p {color:blue;}
</style>
h1 {color:red;}
p {color:blue;}
</style>
Versuchen »
Browser-Unterstützung
Alle gängigen Browser unterstützen das type-Attribut.
Definition und Verwendung
Die erforderliche type-Attribut angegebenen MIME-Typ von Stylesheet.
type-Attribut gibt den <style> -Tag und Inhalt zwischen den Tags </ style>.
Value "text / css", das anzeigt, dass der Inhalt Standard CSS ist.
Die Unterschiede zwischen den HTML 4.01 und HTML5
In HTML5, ist type-Attribut nicht mehr notwendig. Der Standardwert ist "text / css".
Grammatik
<style type="MIME_type">
Eigenschaft Wert
值 | 描述 |
---|---|
MIME_type | 样式表的 MIME 类型。目前,唯一可能的值是 "text/css"。 查看完整标准 MIME 类型列表 IANA MIME 类型 。 |
HTML <style> -Tag