type (HTML attribute)

Spec
Depr. Version
No HTML 4
Browser support (more…)
IE5.5+ FF1+ SA1.3+ OP9.2+ CH2+
Full Full Full Full Full

Syntax

type="MIME type"

Description

type is a required attribute of the style element that identifies the content enclosed between the opening <style> and closing </style> tags.

Example

In this example, the MIME type is set to "text/css" to indicate that it’s standard CSS text:

<style type="text/css">
⋮
</script>

Value

A number of MIME types could be applied in the future, but as of now, the only value you need to enter is "text/css". (The "text/css" media type is defined in RFC 2318.)

Compatibility

Internet Explorer Firefox Safari Opera Chrome
5.5 6.0 7.0 8.0 1.0 1.5 2.0 3.0 3.5 1.3 2.0 3.1 4.0 9.2 9.5 10.0 2.0
Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full

Every browser listed supports this attribute.

User-contributed notes

There are no comments yet.

Related Products