HTML <stijl> type Attribuut
Voorbeeld
Gebruik het type attribuut om het mediatype van de <style> tag op te geven:
<style type="text/css">
h1 {color:red;}
p {color:blue;}
</style>
Definitie en gebruik
Het type
kenmerk specificeert het internetmediatype (voorheen bekend als MIME-type) van de <style>
tag.
Het type
attribuut identificeert de inhoud tussen de
<style>
en </style>
tags.
De standaardwaarde is "text/css", wat aangeeft dat de inhoud CSS is.
Browserondersteuning
Attribute | |||||
---|---|---|---|---|---|
type | Yes | Yes | Yes | Yes | Yes |
Syntaxis
<style type="media_type">
Attribuutwaarden
Value | Description |
---|---|
media_type | The Internet media type of the style sheet. For now, the only supported value is "text/css". Look at IANA Media Types for a complete list of standard media types |
❮ HTML <style>-tag