Download presentation
Presentation is loading. Please wait.
Published byLeslie Nichols Modified over 8 years ago
1
Font-Family, Color and Background
2
Basics CSS rule: Selector (multiple separated by, ) Declaration (multiple separated by ; ) Example: p { color: red; } propertyvalue
3
Inheritance Children inherit declarations from parents
4
Font Properties font-family font-size font-style font-variant font-weight font (shorthand property)
5
Fonts selector { font-family: Times, “Lucida Grande”, Verdana, Arial, Helvetica, sans-serif; } Fonts separated by, Fonts used in the order listed Font list: http://www.microsoft.com/typography/fonts/default.aspx http://www.microsoft.com/typography/fonts/default.aspx
6
Generic Font Families serif (e.g., Times New Roman) sans-serif (e.g., Arial) Cursive (e.g., Comic Sans MS) Fantasy (E.G. aLGERIAN) monospace (e.g., Courier) Always specify generic font family (last in list of font-families)
7
Text Properties color direction line-height letter-spacing text-align text-decoration text-indent text-transform white-space word-spacing
8
Color Values Color names: color: black; or aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow RGB colors: http://web.njit.edu/~kevin/rgb.txt.html http://web.njit.edu/~kevin/rgb.txt.html RGB percentages: color: rgb(0%, 0%, 0%); RGB numbers: color: rgb(0,0,0); RGB hex shorthand: ○ color: #000000; same as ○ color: #000; ○ Color shorthand can only be used to replace paired characters #fc0 = #ffcc00 #ffcc09 no shorthand
9
Text Properties color direction line-height letter-spacing text-align text-decoration text-indent text-transform white-space word-spacing see: http://www.w3schools.com/css/css_text.asp http://www.w3schools.com/css/css_text.asp
10
Color Properties background-color background-image background-repeat background-position background-attachment background (shorthand property)
11
Background Color Default transparent Not inherited (like all background properties)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.