SVG stands for Scalable Vector Graphic. It can be used to make graphics and animations like in HTML canvas.
The SVG <style> element allows style sheets to be embedded directly within the SVG content.
Syntax:
<style>
Styling Content
</style>
Attribute:
- type: Type of stylesheet to be used.
- media: This attribute defines which media the style applies.
- title: This attribute the title of the style sheet which can be used to switch between alternate style sheets.
- Global Attributes: Some global attributes used like core attributes and styling attributes, etc.
Example 1:
Output:
👁 Image
Example 2:
Output:
👁 Image
Browsers Supported: The following browsers are supported by this SVG element:
- Chrome 1 and above
- Edge 12 and above
- Firefox 1.5 and above
- Safari 3.1 and above
- Internet Explorer 9 and above
- Opera 9 and above