HTML <style> ketik Atribut

tag <style> HTML

Contoh

Gunakan atribut type untuk menentukan jenis media dari tag <style> :

<style type="text/css">
h1 {color:red;}
p {color:blue;}

</style>

Definisi dan Penggunaan

Atribut typemenentukan jenis media Internet (sebelumnya dikenal sebagai jenis MIME) dari <style>tag.

Atribut typemengidentifikasi konten antara <style>dan </style> tag.

Nilai defaultnya adalah "text/css", yang menunjukkan bahwa kontennya adalah CSS.


Dukungan Peramban

Attribute
type Yes Yes Yes Yes Yes

Sintaksis

<style type="media_type">

Nilai Atribut

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

tag <style> HTML