HTML <styl> typ Atrybut
Przykład
Użyj atrybutu type, aby określić typ nośnika tagu <style> :
<style type="text/css">
h1 {color:red;}
p {color:blue;}
</style>
Definicja i użycie
type
Atrybut określa typ mediów internetowych (wcześniej znany jako typ MIME) znacznika <style>
.
type
Atrybut identyfikuje zawartość między
<style>
znacznikami </style>
i .
Domyślna wartość to „text/css”, co oznacza, że treść jest CSS.
Obsługa przeglądarki
Attribute | |||||
---|---|---|---|---|---|
type | Yes | Yes | Yes | Yes | Yes |
Składnia
<style type="media_type">
Wartości atrybutów
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 |
❮ Znacznik HTML <style>