VOOZH about

URL: https://www.geeksforgeeks.org/html/svg-style-attribute/

⇱ SVG style Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

SVG style Attribute

Last Updated : 31 Mar, 2022

The style attribute helps us to style an element using CSS declarations. It works very much similar to the style attribute of HTML. Almost all the elements are using this attribute.

Syntax:

style = "<style>"

Attribute values: The style attribute accepts the values mentioned above and described below.

  • style: The syntax of style data depends on the provided CSS.

Below examples illustrate the use of the style attribute.

Example 1:

Output:

👁 Image

Example 2:

Output:

👁 Image
Comment