HTML sl;style sgt; type property

HTML style type property HTML .lt;style> tags

To set the MIME type of an HTML style sheet with the type property, refer to the following example:

Use the type property in the label:

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

Try it out . . .

Browser support

HTML style type property HTML style type property HTML style type property HTML style type property HTML style type property

The type property is supported by all major browsers.


Definitions and usages

The required type property specifies the MIME type of the style sheet.

The type property indicates the content between the and the labels.

The value "text/css" indicates that the content is standard CSS.


The difference between HTML 4.01 and HTML5

In HTML5, the type property is no longer a must. The default is "text/css".


Grammar

<style type=" MIME_type ">

The property value

value describe
MIME_type MIME type of style sheet.Currently, the only possible value is "text / css". View full standard MIME type list IANA MIME type


HTML style type property HTML .lt;style> tags