HTML <stijl> type Attribuut

❮ HTML <style>-tag

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 typekenmerk specificeert het internetmediatype (voorheen bekend als MIME-type) van de <style>tag.

Het typeattribuut 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