Jump to content

font-family


Ninjakreborn

Recommended Posts

I was wondering about font's.  I have been using the same 4, but aren't font's specifically set up under families.

serif", "sans-serif", "cursive", "fantasy", "monospace" Those are the families right, then any sub-font's are fonts within that font family. Are there any font families other than those.
See I am trying to get a general idea on what all options are actuallya vailable with css font-family.  Does anyone know of a huge list of all the font families, what fonts are in those font families, atleast all the one's that are used in the browser's by default.  I am trying to get an idea of what all can be safely used, and what can be partially used, but you should have a backup for.
Link to comment
Share on other sites

Font-family is [b]not[/b] a pre-defined thing. It is a way for you to define a family of fonts to use on a specified tag/grouping in CSS. With CSS, I'm fairly safe saying you're at complete liberty to come up with almost anything you can imagine, and if you syntax is correct, the browsers will render it. What happens with font-family is that the first one listed is the "default" that the browser will attempt to render with. If that font is not present on the computer, it falls back to the second, the third, and so on. Therefore, it is a good idea to round out the list with a "family" such as serif, sans-serif or mono. I could, however, mix them up and actually do something like this:
[code]
font-family: Verdana, "Times New Roman", "Trebuchet MS", Georgia, Arial, sans-serif;
[/code]

Notice there are serif and sans-serif fonts present in my listing, but I eventually default back to sans-serif.

For any other specific questions you have on how to view fonts, check out the [url=http://www.w3.org/TR/REC-CSS2/fonts.html]W3C font reference[/url]. It lists the only general font families to be serif, sans-serif, cursive, fantasy and monospace.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.