HTML style type attribute


Use of the type attribute in a <style> tag:
<style type="text/css">
h1 {color:red}
p {color:blue}
<h1>Header 1</h1>
<p>A paragraph.</p>

Definition and Usage

The required type attribute specifies the MIME type of the style sheet.
The type attribute identifies the content between the <style> and </style> tags.
The value "text/css" indicates that the content is standard CSS.

Browser Support

The type attribute is supported in all major browsers.


<style type="value">

Attribute Values

Value Description
mime_type The MIME type of the style sheet. For now, the only possible value is "text/css"
HTML style type attribute Reviewed by 1000sourcecodes on 02:48 Rating: 5
Powered by Blogger.