Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Font families refers to how we can tell the browser what font to use - Times New Roman versus say Arial.

One of the interesting challenges with web browsers is they run on all types of operating systems and so we cannot guarantee what font is available on a given browser so CSS allows one to specify several font families in order of most preferred to least preferred.

For instance:

body.MAIN > * {
   font-family: Arial, Helvetica, sans-serif;
}

This specifies that the font Arial should be used if present, and if not then try Helvitica or if that cannot be found use sans-serif.

See CSS Selectors to understand the first line of the above example.

  • No labels