CSS Help what is CSS
What
is CSS?
Rundown:
They define how to display HTML elements.
In Depth:
CSS (Cascading Style Sheets) define how to display HTML elements. They are normally
stored in Style Sheets (.css), they were added to HTML 4.0 to solve a problem.
CSS is a breakthrough in Web design because it allows developers to control the
style and layout of multiple Web pages all at once!
Property
|
Values
|
Applies
to
|
inherited
|
%
values
|
font-family | [[<family-name> | <generic-family>],]*
[<family-name> | <generic-family>] default: UA-specific |
all elements | yes | n/a |
font-style | normal | italic | oblique | all elements | yes | n/a |
font-variant | normal | small-caps | all elements | yes | n/a |
font-weight | normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | all elements | yes | n/a |
font-size | <absolute-size> | <relative-size> | <length> | <percentage> default: medium |
all elements | yes | relative to parent element's font size |
font (shorthand property) |
[<font-style> || <font-variant> || <font-weight>]? <font-size> [/<line-height>]? <font-family> default: not defined |
all elements | yes | allowed on <font-size> and <line-height> |
Background and Color | ||||
color | <color> default: UA-specific |
all elements | yes | n/a |
background-color | transparent | <color> | all elements | no | n/a |
background-image | none | <url> | all elements | no | n/a |
background-repeat | repeat | repeat-x | repeat-y | no-repeat | all elements | no | n/a |
background-attachment | scroll | fixed | all elements | no | n/a |
background-position | [<percentage> | <length>]{1,2}
| [top | center | bottom] ||
[left | center | right] default: 0% 0% |
block-level and replaced elements | no | refer to the size of the element itself |
background (shorthand property) |
<background-color> || <background-image> || <background-repeat> || <background-attachment> || <background-position> default: not defined |
all elements | no | allowed
on <background- position> |