---
title: mediaType
framework: webkit
role: symbol
role_heading: Instance Property
path: webkit/wkwebview/mediatype
---

# mediaType

The media type for the contents of the web view.

## Declaration

```swift
var mediaType: String? { get set }
```

## Discussion

Discussion When the value of this property is nil, the web view derives the current media type from the CSS media property of its content. If you assign a value other than nil to this property, the web view uses the value you provide instead. The default value of this property is nil.

## See Also

### Inspecting the view information

- [scrollView](webkit/wkwebview/scrollview.md)
- [title](webkit/wkwebview/title.md)
- [url](webkit/wkwebview/url.md)
- [customUserAgent](webkit/wkwebview/customuseragent.md)
- [serverTrust](webkit/wkwebview/servertrust.md)
- [hasOnlySecureContent](webkit/wkwebview/hasonlysecurecontent.md)
- [themeColor](webkit/wkwebview/themecolor.md)
- [underPageBackgroundColor](webkit/wkwebview/underpagebackgroundcolor.md)
