---
title: WebPage.CSSMediaType
framework: webkit
role: symbol
role_heading: Structure
path: webkit/webpage/cssmediatype
---

# WebPage.CSSMediaType

A CSS media type as defined by the CSS specification, or an arbitrary media type value.

## Declaration

```swift
struct CSSMediaType
```

## Overview

Overview Media types are one of several media queries that influence the @media CSS at-rule; this rule is used by webpages to apply parts of a style sheet depending on the media properties specified. You can customize the media type of a WebPage by using the mediaType property.

## Topics

### Initializers

- [init(rawValue:)](webkit/webpage/cssmediatype/init(rawvalue:).md)

### Instance Properties

- [rawValue](webkit/webpage/cssmediatype/rawvalue.md)

### Type Properties

- [all](webkit/webpage/cssmediatype/all.md)
- [print](webkit/webpage/cssmediatype/print.md)
- [screen](webkit/webpage/cssmediatype/screen.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Inspecting page information

- [title](webkit/webpage/title.md)
- [url](webkit/webpage/url.md)
- [mediaType](webkit/webpage/mediatype.md)
- [customUserAgent](webkit/webpage/customuseragent.md)
- [serverTrust](webkit/webpage/servertrust.md)
- [hasOnlySecureContent](webkit/webpage/hasonlysecurecontent.md)
- [themeColor](webkit/webpage/themecolor.md)
- [isBlockedByScreenTime](webkit/webpage/isblockedbyscreentime.md)
- [isInspectable](webkit/webpage/isinspectable.md)
- [isWritingToolsActive](webkit/webpage/iswritingtoolsactive.md)
