|
Chapter 3: Font stylesIn CSS, there are two types of font family names: Generic family - a group of font families with a similar look (like "Serif" or "Monospace") Font family - a specific font family (like "Verdana" or "Arial") The font-family property holds several font names as a fallback system. If the browser does not support the first font, it tries the next font. Note: If the name of a font family is more than one word, it must be in quotation marks, like font-family: "Times New Roman". Example: h1 {font-family: arial, verdana, sans-serif;} h2 {font-family: "Verdana", serif;} In the above example, headlines marked with <h1> will be displayed using the font "Arial". If this font is unavailable, "Verdana" will be used instead. If both are unavailable, a font from the sans-serif family will be used to show the headlines.
Some of the possible values for font attributes in CSS:
Difference Between Serif, Non-serif and Monospace FontsSerif fonts have rounded edges and are considered easier to read than non-serif ones for computer screens. Monospace fonts have same width for all characters. Example: Serif fonts: Times New Roman, Georgia Non-serif: Arial, Verdana Monospace: Courier New, Lucida Console Text attributesApart from the font style, there is another class of styles which provide text-effects. Some of them are as follows:
Text attributes:
|
Got a thought to share or found a
bug in the code?
We'd love to hear from you:
Name: | |
Email: | (Your email is not shared with anybody) |
Comment: |
Facebook comments: