Styling Text in CSS
- Applying Font
-
There are 3 ways to apply font:
1. Single Font Name:
body
{
font-family: Verdana;
}
2. Font Family Keyword:
body
{
font-family: serif;
}
3. Multiple Font Names:
body
{
font-family: Verdana,Arial,Helvetica,sans-serif;
}
- Core Fonts
-
Sans Serif
Arial, Arial Black, Trebuchet, Verdana
Serif
Georgia, Times New Roman
Monospace
Courier New, Andale Mono
Cursive
Apple Chancery, Comic Sans, Snell
Fantasy
Impact, Stencil
- Sizing Font
-
Done using the “font-size” property There are 4 ways:
-
Using Absolute Keywords: Small, x-small, xx-small, Large, x-large, xx-large, Meadium
For Example
body
{
font-size: medium;
}