Pr.Pg Next Pg

<STYLE>..</STYLE> tag tutorials

  • The <STYLE> tag is used to define style information for an HTML document.

  • Inside the <STYLE> element you specify how HTML elements should render in a browser.

  • Each HTML document can contain multiple <STYLE> tags.

  • <STYLE> tag attributes are listed below:


Sr No





This attribute is used to define the type of style sheet. The value of the attribute should be the MIME type of the style sheet language used. The most common current value for this attribute is text/css, which indicates a CSS format.



This attribute specifies the destination medium for the style information. The value of the attribute can be a single media descriptor, such as screen, or a comma-separated list.

Possible values for this attribute include all, aural, braille, print, projection, screen, and tv.



This attributes specifies that the styles only apply to this element's parent element and that element's child elements. If this attribute is not used, styles will be applied to the whole document.


  • The HTML <style> tag is supported by all major browsers like, Chrome, Firefox, Internet Explorer, Safari, Opera etc.




<syle element lists and it’s css property>




Example: HTML program to demonstrate style element

Pr.Pg border                                              Next Pg