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


## media {#str}

Sets the 'media' attribute of the SVG 'style' element.
This attribute specifies the media for which the styles are intended, allowing the styles to be conditional on the media type.


### Returns 


The SVGStyleElementBuilder instance for chaining.


```python
def media(self, media_descriptors):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| media_descriptors | str | The media descriptor string (e.g., "screen", "print"). |



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