---
title: "SVGStyleElementBuilder class"
url: "https://reference.aspose.com/svg/python-net/aspose.svg.builder/svgstyleelementbuilder/"
product: "Aspose.SVG for Python via .NET API References"
---


## SVGStyleElementBuilder class

A builder class for constructing an SVG 'style' element.
This class facilitates the creation and configuration of an SVG style element with CSS rules.



The SVGStyleElementBuilder type exposes the following members:

### Constructors
| Constructor | Description |
| :- | :- |
| [__init__](/svg/python-net/aspose.svg.builder/svgstyleelementbuilder/__init__/#) | Constructs a new instance of SVGStyleElementBuilder |


### Methods
| Method | Description |
| :- | :- |
| [build](/svg/python-net/aspose.svg.builder/svgstyleelementbuilder/build/#aspose.svg.dom.Document) | Builds the SVG style element with the accumulated CSS rules and adds it to the specified document. |
| [build](/svg/python-net/aspose.svg.builder/svgstyleelementbuilder/build/#aspose.svg.SVGStyleElement) |  |
| [add_rule](/svg/python-net/aspose.svg.builder/svgstyleelementbuilder/add_rule/#str-str) | Adds a CSS rule to the style element. |
| [add_comment](/svg/python-net/aspose.svg.builder/svgstyleelementbuilder/add_comment/#str) | Adds a comment to the style content. |
| [type](/svg/python-net/aspose.svg.builder/svgstyleelementbuilder/type/#str) | Sets the 'type' attribute of the SVG 'style' element.<br/>This attribute specifies the style sheet language of the element's contents. |
| [media](/svg/python-net/aspose.svg.builder/svgstyleelementbuilder/media/#str) | Sets the 'media' attribute of the SVG 'style' element.<br/>This attribute specifies the media for which the styles are intended, allowing the styles to be conditional on the media type. |
| [title](/svg/python-net/aspose.svg.builder/svgstyleelementbuilder/title/#str) | Sets the 'title' attribute of the SVG 'style' element.<br/>This attribute provides an advisory title for the style element, which can be useful for accessibility and tool-tip text. |
| [build_element](/svg/python-net/aspose.svg.builder/svgstyleelementbuilder/build_element/#aspose.svg.dom.Document) | Builds and returns an SVGElement instance based on the current configuration of the builder. |
| [attribute](/svg/python-net/aspose.svg.builder/svgstyleelementbuilder/attribute/#str-str) | Sets or updates an attribute on an SVG element. |



### See Also
* module [`aspose.svg.builder`](..)
* class [`ISVGElementBuilder`](/svg/python-net/aspose.svg.builder/isvgelementbuilder)
