Inheritance
Inheritance
Font Properties
• font-family
• values are:
• family-name
• generic-family
Font Properties
• font-style
• values are:
• normal
• italic
• oblique
Font Properties
• font-variant
• Values are:
• normal
• small-caps
• font-weight
P { font-weight: bold }
Font Properties
Font Properties
• font-size
BODY { font-size: x-large } P { font-size: 10px }
Font Properties
Font Properties
FONT Property
EXAMPLE
• word-spacing
• defines whitespaces between words.
• letter-spacing
BLOCKQUOTE {letter-spacing:0.1em }
BLOCKQUOTE { letter-spacing: 0 }
BLOCKQUOTE { letter-spacing: 0cm }
TEXT PROPERTIES
• text-decoration
A:link, A:visited, A:active { text-decoration: underline }
• color
BODY {color:blue} H1 {color:#00ff00}
H2{color:rgb(255,0,0)}
TEXT PROPERTIES
• vertical-align
• values are: baseline, middle, sub, super, text-top, text-bottom, bottom,
top.
H1 { text-align:center }
P { text-align:right }
P { text-align:justify }
TEXT PROPERTIES
• text-transform
• values are: capitalize, uppercase, lowercase, none (initial
value).
H1 { text-transform: uppercase }
TEXT PROPERTIES
• text-indent
• if identified with a negative value, first line is indented to the left.
P { text-indent: 3em }
P { text-Indent: 20px }
P { text-indent: -12px }
• line-height
• sets the distance between lines.
P { line-height: 1.4 }
P { line-height: 14pt }
P { line-height: 140% }
TEXT PROPERTIES
• background-color
• values can be in name, rgb, hex values, transparent.
H1 { background-color: #F00 }
BODY { background-color:yellow; }
H1 { background-color:#00ff00; }
P { background-color:rgb(255,0,255); }
• background-image
BACKGROUND PROPERTIES
• background-repeat
• determines how/if the image is repeated –repeat-x, repeat-y,
no-repeat.
BODY { background: redurl(pendant.gif); background-
repeat: repeat-y; }
• background-attachment
• values are scroll and fixed.
BODY { background: red url(pendant.gif); background-
repeat: repeat-y; background-attachment: fixed;}
BACKGROUND PROPERTIES
• background-position
BACKGROUND PROPERTIES
• background
• Sets all individual background properties in one declaration.
• background-color
• background-image
• background-repeat
• background-attachment
• background-position
BACKGROUND PROPERTIES