style element



Style element is used to highlight contents by applying styles. It is enough to set the style once, so that it can be applied wherever the style is required.
<style type="text/css"> </style>
Element Specific attributes supported by this element are:
scoped scoped Style will match the parent and child element of the element.
type text/css Indicates the style sheets MIME type.
media media_query Informs about media, which was optimized.

Example Code:

Result :


  • This element must be placed inside the <head>.
  • It is possible to use more than one style elements at once.
  • This element reduces the work load of a user. User can use this element once to apply style for the required portions in a content.
It is available in previous versions of HTML.
It supports both Global Attributes and Event Attributes in HTML5.


It is applicable to all the browsers.

Ask Questions

Ask Question