Web Development and Design Foundations with XHTML, 5th Edition

(Steven Felgate) #1

(^614) Appendix C CSS Property Reference
Table C.1Cascading style sheet properties (continued)
Property
font-family
Common Values: Valid font name or a font family such as "serif", "sans-serif", "fantasy",
"monospaced", or "cursive"
Usage: Configures the type of font used to display an element.
Example: font-family:Arial, Verdana, sans-serif;
font-size
Common Values: Numeric value (pt, px, or em), percentage, absolute size ("xx-small", "x-small",
"small", "medium"(default), "large", "x-large", "xx-large"), relative size
("smaller", "larger")
Usage: Configures the size of the font used to display an element.
Example: font-size:smaller;
font-style
Common Values: "normal"(default), "italic", "oblique"
Usage: Configures the style of the text.
Example: font-style:italic;
font-variant
Common Values: "normal"(default), "small-caps"
Usage: Configures the display as regular text or in small capital letters.
Example: font-variant:small-caps;
font-weight
Common Values: Numeric value ("100", "200", "300", "400", "500", "600", "700", "800"), relative
value ("normal"(default), "bold", "bolder", "lighter")
Usage: Configures the boldness of the text.
Example: font-weight:400;
height
Common Values: A numeric value (pxor em), percentage, or auto(default)
Usage: Configures the height of an element.
Example: height:300px;
left
Common Values: A numeric value (pxor em)or percentage
Usage: Configures the distance in from the left (of the containing element) to display an element.
Example: left:100px;
line-height
Common Values: Numeric value, percentage
Usage: Configures the spacing allowed for a line of text. The value 200% configures double-spaced text.
Example: line-height:200%;
float
Common Values: "right", "left"
Usage: Configures the horizontal placement (left or right) of an element in a parent element
Example: float:left;

Free download pdf