You are here: Reference > HTML > attributes > type (style)

type attribute (style)

Browser support:
Specifies the type of style sheet language.
If the value of this attribute is set, it overrides the default styleSheet language.
JavaScript page for this attribute: type. You can find other example(s) there.

Possible values:

String that sets the language type.
One of the following values:
text/css
Language : Cascading Style Sheets.
text/javascript
Language : JavaScript.
Default: this attribute has no default value.

Example HTML code 1:

This example illustrates the use of the type attribute:
<head>
    <style type="text/css">
        H1 {border: 2px solid red;}
    </style>
</head>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content