출처: http://www.w3schools.com/css/css_font.asp


Difference Between Serif and Sans-serif Fonts

Serif vs. Sans-serif

Remark On computer screens, sans-serif fonts are considered easier to read than serif fonts.



CSS Font Families

In 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 "Times New Roman" or "Arial")
Generic familyFont familyDescription
SerifTimes New Roman
Georgia
Serif fonts have small lines at the ends on some characters
Sans-serifArial
Verdana
"Sans" means without - these fonts do not have the lines at the ends of characters
MonospaceCourier New
Lucida Console
All monospace characters have the same width




Font Family

The font family of a text is set with the font-family property.


The font-family property should hold several font names as a "fallback" system. If the browser does not support the first font, it tries the next font.


Start with the font you want, and end with a generic family, to let the browser pick a similar font in the generic family, if no other fonts are available.


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".


More than one font family is specified in a comma-separated list:

Example

p{font-family:"Times New Roman", Times, serif;}

Try it yourself »

For more commonly used font combinations, look at our Web Safe Font Combinations.




All CSS Font Properties

PropertyDescription
fontSets all the font properties in one declaration
font-familySpecifies the font family for text
font-sizeSpecifies the font size of text
font-styleSpecifies the font style for text
font-variantSpecifies whether or not a text should be displayed in a small-caps font
font-weightSpecifies the weight of a font



CSS Fonts

Set the font of a text
Set the size of the font
Set the size of the font in px
Set the size of the font in em
Set the size of the font in percent and em
Set the style of the font
Set the variant of the font
Set the boldness of the font
All the font properties in one declaration

Font properties explained



'개발관련 > CSS/CSS3' 카테고리의 다른 글

[CSS]CSS Styling - Styling Tables  (0) 2012.10.23
[CSS]CSS Styling - Styling Lists  (0) 2012.10.23
[CSS]CSS Styling - Styling Links  (0) 2012.10.23
[CSS]CSS Styling - Styling Text  (0) 2012.10.23
[CSS]CSS Styling - Styling Backgrounds  (0) 2012.10.23
Posted by 파노카페
: