<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebPreferences/defaultFontSize",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WebPreferences(py)defaultFontSize"
  },
  "title" : "defaultFontSize"
}
-->

# defaultFontSize

The default font size of the web view.

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

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)