MyInternships.in

CSS References

CSS Web Safe Fonts

Web-safe fonts are typefaces that are pre-installed on the vast majority of computers and devices, so they render consistently without downloading anything. When you specify a font, always provide a stack — a comma-separated list ending in a generic family — so the browser falls back gracefully. This reference lists dependable stacks by style.


Web safe font stacks

FontRecommended stackStyle
System UIsystem-ui, -apple-system, "Segoe UI", Roboto, sans-serifNative OS UI font — fast and modern
ArialArial, Helvetica, sans-serifSans-serif
Helvetica"Helvetica Neue", Helvetica, Arial, sans-serifSans-serif
VerdanaVerdana, Geneva, sans-serifSans-serif (wide, legible)
TahomaTahoma, Geneva, sans-serifSans-serif
Trebuchet MS"Trebuchet MS", Helvetica, sans-serifSans-serif (humanist)
Gill Sans"Gill Sans", "Gill Sans MT", Calibri, sans-serifSans-serif
GeorgiaGeorgia, "Times New Roman", serifSerif
Times New Roman"Times New Roman", Times, serifSerif
GaramondGaramond, "Times New Roman", serifSerif (elegant)
Palatino"Palatino Linotype", "Book Antiqua", Palatino, serifSerif
CambriaCambria, Georgia, serifSerif
Courier New"Courier New", Courier, monospaceMonospace
ConsolasConsolas, "Courier New", monospaceMonospace (code)
Lucida Console"Lucida Console", Monaco, monospaceMonospace
Monospace systemui-monospace, SFMono-Regular, Menlo, Consolas, monospaceMonospace (native code font)
Comic Sans MS"Comic Sans MS", "Comic Sans", cursiveCasual / cursive
Brush Script MT"Brush Script MT", cursiveCursive / script

Generic font families

Always end a font stack with a generic family. The browser uses it if none of the named fonts are available.

Generic familyMeaning
serifFonts with small strokes at letter ends (e.g. Times).
sans-serifFonts without those strokes (e.g. Arial).
monospaceFixed-width fonts for code (e.g. Courier).
cursiveHandwriting-style fonts.
fantasyDecorative display fonts.
system-uiThe default UI font of the operating system.

Using a font stack

Example
<!DOCTYPE html>
<html>
<head>
<style>
  body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
  h1   { font-family: Georgia, "Times New Roman", serif; }
  code { font-family: ui-monospace, Consolas, "Courier New", monospace; }
</style>
</head>
<body>
  <h1>Serif heading</h1>
  <p>Sans-serif body text with a native system font.</p>
  <p><code>monospace code</code></p>
</body>
</html>
💡

The modern system font stack (system-ui, -apple-system, Segoe UI, Roboto…) gives your site the native look of each OS with zero download and instant rendering.

Related CSS Topics

Keep learning with these closely related tutorials.

Ready to use your CSS skills?

Find web development internships and fresher jobs across India.

Browse Web Dev Internships