Is there a way to set the *default* monospace font in Safari?
The following information was correct when it was posted, but now only applies to obsolete versions of Safari.



There are unexposed preferences for changing the default fonts and font sizes:

defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2StandardFontFamily Georgia
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DefaultFontSize 16
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2FixedFontFamily Menlo
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DefaultFixedFontSize 14


Another option is to edit the CSS file that defines the default styles (look in
Preferences > Advanced > Stylesheet), adding something like this, for example:

@font-face {
   font-family: monospace;
   src: local('Menlo');
}


That rule makes any element that uses font-family: monospace (as well as elements like &lt;pre&gt; and &lt;code&gt; by default) use Menlo. Just change the font name (being careful to keep the enclosing quotes) to whatever you prefer.