Web Design with HTML and CSS

(National Geographic (Little) Kids) #1
Appendix 271

CSS Properties and Values


This table provides a reference to some of the most commonly used CSS properties in
CSS 2.1. In addition to the name of the property, the allowed values have been listed. For a
complete list of CSS properties visit http://www.w3.org/TR/CSS21/propidx.html. For a more
in-depth discussion on how to add custom values, please review Lesson 4: Fundamentals of
HTML, XHTML, and CSS.


Name Possible Values Default value
background-attachment scroll | fi xed |
inherit

scroll

background-color <color> |
transparent |
inherit

transparent

background-image <uri> | none |
inherit

none

background-position [ [ <percentage>
| <length> | left
| center | right
] [ <percentage>
| <length> | top |
center | bottom ] ]
| [ [ left | center
| right ] || [ top
| center | bottom ]
] | inherit

0% 0%

background-repeat repeat | repeat-x
| repeat-y | no-
repeat | inherit

repeat

background [background-color
|| background-
image ||
background-repeat
|| background-
attachment ||
background-
position] | inherit

see individual properties

border-collapse collapse | separate
| inherit

separate

border-color [ <color> |
transparent ]{1,4}
| inherit

see individual properties

border-spacing <length> <length>?
| inherit

0


border-style <border-style>{1,4}
| inherit

see individual properties

Appendix

Free download pdf