Basic text styling

These styles look OK in most circumstances. Adapt them to your needs.

  • Use a 14px font for most text.
  • Use larger fonts for headings.
  • Use smaller fonts for support text, like help messages.
  • Use a sans serif typeface for everything.
  • Left-align everything.


<style type="text/css">
  body {
    background-color: #FFFFEE;
    font-family: "Trebuchet MS", sans-serif;
    font-size: 14px;

Verdana and Trebuchet MS are nice sans serif fonts. There is an article on safe typefaces.

If you use Trebuchet MS, be sure to use quotes in CSS, because of the space in the typeface’s name. Consider adding at least one alternate font as well. For example:

font-face: "Trebuchet MS", sans-serif;


How to...