---
title: defaultFontSize
framework: webkit
role: symbol
role_heading: Instance Property
path: webkit/webpreferences/defaultfontsize
---

# defaultFontSize

The default font size of the web view.

## Declaration

```swift
var defaultFontSize: Int32 { get set }
```

## Discussion

Discussion The default font size to use for content displayed in a fixed font if no font size or font family is specified. The font size specified by size should always be greater than zero.

## See Also

### Getting and Setting Font Sizes

- [defaultFixedFontSize](webkit/webpreferences/defaultfixedfontsize.md)
- [minimumFontSize](webkit/webpreferences/minimumfontsize.md)
- [minimumLogicalFontSize](webkit/webpreferences/minimumlogicalfontsize.md)
