| You are here: | About>Computing & Technology>Web Design / HTML> CSS> Beginning CSS> CSS Tutorial> Modify Fonts with CSS - Font Size, Font Family, Font Weight, Font Style - Cascading Style Sheets Fonts |
![]() | Web Design / HTML |
HTML References / Web Design ReferencesCSS 1 and CSS 2 PropertiesHTML 4.01 Tags / XHTML 1.0 ElementsHTML Codes HTML Tutorials / Web Design Tutorials / CSS TutorialsHTML 4.01 Tutorial / XHTML 1.0 TutorialCSS 1 and CSS 2 TutorialXML Tutorial Modify Fonts with CSS< Previous - Add a Style Sheet | Quick CSS Course (5 days) | Beginning CSS Articles | Next - Adjust Text with CSS > font-family: The font family defines the face of the font, such as Geneva, Times New Roman, or fantasy. You list the font families you'd like your property to use in order of preference separated by a comma, with multiple word font names indicated in quotes: font-family : "Times New Roman", Courier, serif; font-size: Defines the size of the font. There are four types of sizes:
font-weight: Defines the boldness of the font. It can be normal (the default), bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, or 900. font-style: Defines if the font is italic or oblique. It can be defined as normal (the default), italic, or oblique. font-variant: Changes the font to small-caps. It can be defined as normal (the default) or small-caps. font: This is a shorthand property. It allows you to define all of the above font styles, plus the line height of your text. font: font-style font-variant font-weight font-size/line-height font-family; Other Font Properties: CSS 3 brings us a lot of additional font properties to style fonts. Some work now and some don't. Always be sure to test in your browsers. Dynamic Fonts: Dynamic fonts allow you to define a font face or property that isn't necessarily on the customer's computer. They are also sometimes called embedded fonts. They are not widely supported, so be sure to test before you rely on them. < Previous - Add a Style Sheet | Quick CSS Course (5 days) | Beginning CSS Articles | Next - Adjust Text with CSS > HTML References / Web Design ReferencesCSS 1 and CSS 2 PropertiesHTML 4.01 Tags / XHTML 1.0 ElementsHTML Codes HTML Tutorials / Web Design Tutorials / CSS TutorialsHTML 4.01 Tutorial / XHTML 1.0 TutorialCSS 1 and CSS 2 TutorialXML Tutorial |
Las Vegas on a BudgetFind a BargainHotel DealsCheap EatsFree AttractionsEntertainment for Less |
All Topics | Email Article | | | ![]() |
| Advertising Info | News & Events | Work at About | SiteMap | Reprints | Help | Our Story | Be a Guide |
| User Agreement | Ethics Policy | Patent Info. | Privacy Policy | ©2008 About, Inc., A part of The New York Times Company. All rights reserved. |


