HTML <style> Tag

The style element is used to include CSS into an HTML document.

It can be included in either the <body> or the <head> tags. This tag is sometimes referred to as the <style> element.

The <style> element is used to define a document's style information (CSS). The <style> element specifies how HTML components should appear in a browser.





Attribute Value Description
media media_query Specifies the media/device for which the media resource is optimized.
type text/css The media type of the <style> element is specified.

Supported Browsers

Element Chrome Firefox Safari Edge / IE Opera
<style> Yes Yes Yes Yes Yes