CSS Properties List
CSS Properties List
SONIYA SUTHAR 1
2
background-repeat
background-attachment
background-position
SONIYA SUTHAR 3
4
color:#00FF00; }
none
hidden
dotted
div { border-left-
dashed
style:solid; }
border- Declares the style of solid
left-style the left border. double
div { border-left-
groove
style:inset; }
ridge
inset
outset
Lengths or the following predefined values: div { border-left-
width:2px; }
border- Declares the width of
thin
left-width the left border.
medium div { border-left-
thick width:thin; }
Separate values by a space in the following div { border-
order (those that are not defined will use left:2px solid
Used as a shorthand
inherited or default initial values): green; }
property to set all the
border-left
border-left properties
border-left-width div { border-
at once.
border-left-style left:thick double
border-left-color #00FF00; }
Valid color names, RGB values, hexidecimal
notation, or the predefined value transparent.
SONIYA SUTHAR 4
5
solid
double div { border-
groove style:solid; }
ridge
inset div { border-
outset style:solid dotted;
}
Undeclared values work as further shorthand
notation. If only one style value is declared, all div { border-
four borders will use that style. If two styles style:solid dotted
are declared, the top and bottom borders will dashed; }
use the first style while the right and left
borders will use the second style. If three
styles are declared, the top border will use the
first style, the right and left borders will use
the second style, and the bottom border will
use the third style.
Lengths or the following predefined values:
div { border-
thin
width:1px 3px 5px
medium
2px; }
thick
div { border-
Undeclared values work as further shorthand
Declares the width of width:thin; }
border- notation. If only one width value is declared,
all four borders at
width all four borders will use that width. If two
once. div { border-
widths are declared, the top and bottom
width:2px 4px; }
borders will use the first width while the right
and left borders will use the second width. If
div { border-
three widths are declared, the top border will
width:2px 4px
use the first width, the right and left borders
5px; }
will use the second width, and the bottom
border will use the third width.
Separate values by a space in the following
Used as a shorthand to order (those that are not defined will use div { border:1px
declare the border inherited or default initial values): double green; }
border properties when all
four borders will have border-width div { border:thin
the same appearance. border-style solid #00FF00; }
border-color
SONIYA SUTHAR 5
6
URL values, and the
following prefefined
values:
auto
crosshair
default div { cursor:crosshair; }
pointer
move div {
Declares the type of cursor to be e-resize cusrsor:url(image.csr); }
cursor
displayed. ne-resize
nw-resize div {
n-resize cusrsor:url(image.csr),
se-resize pointer; }
sw-resize
s-resize
w-resize
text
wait
help
none
inline
block
list-item
run-in
compact
marker div { display:none; }
table
Declares if/how the element
display inline-table div { display:inline; }
displays.
table-row-group
table-header-group div { display:marker; }
table-footer-group
table-row
table-column-group
table-column
table-cell
table-caption
Declares whether a box should float
left div { float:left; }
to the left or right of other content, or
float right
whether it should not be floated at
none div { float:right; }
all.
visible div { visibility:visible; }
Declares the visibility of boxes
visibility hidden
generated by an element.
collapse div { visibility:hidden; }
Declares the distance that the top
content edge of the element is offset div { top:15px; }
Lengths, percentages, and
top below the top edge of its containing
the predefined value auto.
block. The position property of the div { top:2%; }
element must also be set to a value
SONIYA SUTHAR 6
7
other than static.
Declares the distance that the right
content edge of the element is offset
div { right:15px; }
to the left of the right edge of its Lengths, percentages, and
right
containing block. The position the predefined value auto.
div { right:2%; }
property of the element must also be
set to a value other than static.
Declares the distance that the bottom
content edge of the element is offset
div { bottom:15px; }
above the bottom edge of its Lengths, percentages, and
bottom
containing block. The position the predefined value auto.
div { bottom:2%; }
property of the element must also be
set to a value other than static.
Declares the distance that the left
content edge of the element is offset
div { left:15px; }
to the right of the left edge of its Lengths, percentages, and
left
containing block. The position the predefined value auto.
div { left:2%; }
property of the element must also be
set to a value other than static.
static
div { position:absolute; }
Declares the type of positioning of an relative
position
element. absolute
div { position:relative; }
fixed
Shapes, or the predefined
value auto.
SONIYA SUTHAR 7
8
bottom
text-bottom
div { z-index:2; }
Declares the stack order of the Integer values and the
z-index
element. predefined value auto.
div { z-index:auto; }
SONIYA SUTHAR 8
9
to allow additional and/or generic
family names to be used if the
prefereed font is unable to be
displayed.
Lengths (number and unit type— i.e.
1em, 12pt, 10px, 80%) or one of the
following predefined values:
div { font-size:70%; }
xx-small
Declares the size of the font.
x-small div { font-size:0.85em;
Previously set in HTML via
font-size small }
the size attribute in a <font>
medium
tag.
large div { font-
x-large size:medium; }
xx-large
smaller
larger
Limited browser support:
Was part of CSS 2, but not
div { font-size-
in CSS 2.1. This property
adjust:0.54; }
font-size- may return in CSS 3.
Numeric value
adjust
div { font-size-
Declares the aspect value
adjust:0.46; }
(font size divided by x-
height).
normal
wider
Limited browser support: narrower
div { font-
Was part of CSS 2, but not ultra-condensed
stretch:narrower; }
in CSS 2.1. This property extra-condensed
font-
may return in CSS 3. condensed
stretch div { font-
semi-condensed
stretch:ultra-
Declares the stretch of the semi-expanded
expanded; }
font face. expanded
extra-expanded
ultra-expanded
div { font-style:italic; }
normal
font-style Declares the font style. italic
div { font-
oblique
style:oblique; }
div { font-
variant:normal; }
font- normal
Declares the font variant.
variant small-caps
div { font-
variant:small-caps; }
normal div { font-
font- Declares the font weight bold weight:bolder; }
weight (lightness or boldness) bolder
lighter div { font-weight:200;
SONIYA SUTHAR 9
10
100 }
200
300
400
500
600
700
800
900
Separate values by a space in the
following order (those that are not
defined will use inherited or default
div { font:italic small-
Used as a shorthand initial values):
caps bold 1em 1.2em
property to declare all of the
Arial }
font font properties at once font-style
(except font-size-adjust and font-variant
div { font:bold 0.8em
font-stretch). font-weight
Verdana }
font-size
line-height
font-family
counter(name)
counter(name, list-style- div:before { content:"some
Generates content in the
type) text"; }
document in conjunction with
content counters(name, string)
the :before and :after pseudo-
counters(name, string, div:after {
elements.
list-style-type) content:url(page2.html); }
attr(X)
open-quote
close-quote
no-open-quote
no-close-quote
counter- Declares the counter increment Integers and the
More Information
increment for each instance of a selector. predefined value none.
Declares the value the counter is
counter- Integers and the
set to on each instance of a More Information
reset predefined value none.
selector.
Declares the type of quotation
String values and the
quotes marks to use for quotations and More Information
predefined value none.
embedded quotations.
SONIYA SUTHAR 10
11
SONIYA SUTHAR 11
12
top margin for the top:5px; }
element.
div { margin-
top:15%; }
div { margin-
Declares the right right:5px; }
margin-
margin for the Lengths, percentages, and the predefined value auto.
right
element. div { margin-
right:15%; }
div { margin-
Declares the bottom bottom:5px; }
margin-
margin for the Lengths, percentages, and the predefined value auto.
bottom
element. div { margin-
bottom:15%; }
div { margin-
Declares the left left:5px; }
margin-
margin for the Lengths, percentages, and the predefined value auto.
left
element. div { margin-
left:15%; }
Separate values by a space in the following order
(those that are not defined will use inherited or
default initial values): div {
margin:5px
margin-top 12px 4px 7px; }
margin-right
margin-bottom div {
Shorthand property margin-left margin:5px; }
used to declare all
margin
the margin Undeclared values work as further shorthand div {
properties at once. notation. If only one length value is declared, all four margin:5px
margins will use that length. If two lengths are 10px; }
declared, the top and bottom margins will use the
first length while the right and left margins will use div {
the second length. If three lengths are declared, the margin:5px 7px
top margin will use the first length, the right and left 4px; }
margins will use the second length, and the bottom
margin will use the third length.
SONIYA SUTHAR 13
14
the margin default initial values): 12px 4px 7px; }
properties at once.
padding-top div {
padding-right padding:5px; }
padding-bottom
padding-left div {
padding:5px
Undeclared values work as further shorthand 10px; }
notation. If only one length value is declared, all four
sides will use that length. If two lengths are declared, div {
the top and bottom sides will use the first length padding:5px
while the right and left sides will use the second 7px 4px; }
length. If three lengths are declared, the top side will
use the first length, the right and left sides will use
the second length, and the bottom side will use the
third length.
SONIYA SUTHAR 14
15
Declares the minimum number of lines of a
@page {
widows paragraph that must be left at the top of a Integers
widows:2; }
page.
Declares the color of the The predefined color names are: div { color:rgb(0,255,0);
color
text. }
aqua
black div { color:#00FF00; }
blue
SONIYA SUTHAR 15
16
fuchsia
gray
green
lime
maroon
navy
olive
purple
red
silver
teal
white
yellow
ltr
rtl div { direction:ltr; }
Declares the reading
direction
direction of the text.
ltr = left-to-right div { direction:rtl; }
rtl = right-to-left
div { line-height:normal;
}
Declares the distance Numbers, percentages, lengths, and
line-height div { line-height:2em; }
between lines. the predefined value of normal.
div { line-height:125%;
}
div { letter-
spacing:normal; }
Declares the amount of A length (in addition to the default
letter- div { letter-spacing:5px;
space between text space) or the predefined value of
spacing }
characters. normal.
div { letter-spacing:-
1px; }
left
right
center div { text-align:center; }
Declares the horizontal justify
text-align alignment of inline div { text-align:right; }
content. If used on a set of table cells, this
property can be given a string value td { text-align:"."; }
to which the text of each row of the
column will be aligned.
none div { text-
underline decoration:none; }
text- Declares the text
overline
decoration decoration.
line-through div { text-
blink decoration:underline; }
Declares the indentation
text-indent Lengths and percentages. div { text-indent:12px; }
of the first line of text.
SONIYA SUTHAR 16
17
div { text-indent:2%; }
A list containg a color followed by
numeric values (separated by
spaces) that specify:
div { text-shadow:green
1. The color for the shadow
2px 2px 7px; }
text- Declares shadow effects effect
shadow on the text. 2. Horizontal distance to the
div { text-shadow:olive -
right of the text
3px -4px 5px; }
3. Vertical distance below the
text
4. Blur radius
div { text-
none
Declares the capitalization transform:uppercase; }
text- capitalize
effects on the letters in the
transform uppercase
text. div { text-
lowercase
transform:lowercase; }
div { unicode-
Declares values relating to
normal bidi:embed; }
unicode- bidirectional text. May be
embed
bidi used in conjunction with
bidi-override div { unicode-bidi:bidi-
the the direction property.
override; }
div { white-space:pre; }
normal
white- Declares how white space
pre
space is handled in an element. div { white-
nowrap
space:nowrap; }
div { word-
A length (in addition to the default spacing:normal; }
word- Declares the space
space) or the predefined value of
spacing between words in the text.
normal. div { word-
spacing:1.5em; }
SONIYA SUTHAR 18
19
Frequencies in hertz (Hz) or the
following predefined values:
div { pitch:120Hz; }
Declares the average x-low
pitch
speaking pitch of a voice. low
div { pitch:high; }
medium
high
x-high
Number values between 0 and
div { pitch-range:50; }
Declares a change in the 100 (lower values indicate a flat
pitch-range
pitch range of a voice. voice while higher values
div { pitch-range:99; }
indicate an animated voice).
URL value, followed by one or
more of the following keywords,
separated by spaces: div { play-
during:url(music.wav); }
Declares a background mix
sound to be played while repeat div { play-
play-during
the current element is during:url(music.wav)
spoken. Alternatley, one of the following repeat; }
keywords:
div { play-during:none; }
auto
none
Numeric values between 0 and
div { richness:50; }
Declares the richness of 100 (lower values have less
richness
the voice in spoken text. richness and higher values have
div { richness:0; }
more richness).
normal div { speak:none; }
Declares if/how text is
speak none
spoken.
spell-out div { speak:spell-out; }
th { speak-header:once; }
speak- Declares how often table once
header header cells are spoken. always
th { speak-header:always; }
div { speak-numeral:digits;
}
speak- Declares how numerals digits
numeral are spoken. continuous
div { speak-
numeral:continuous; }
div { speak-
punctuation:code; }
speak- Declares how code
punctuation punctuation is spoken. none
div { speak-
punctuation:none; }
div { speech-rate:50; }
A number indicating the number
Declares the speech rate
speech-rate of words per minute, or one of
of spoken text. div { speech-rate:medium;
the following predefined values:
}
SONIYA SUTHAR 19
20
x-slow
slow
medium
fast
x-fast
faster
slower
Numeric values between 0 and
div { stress:50; }
Declares the stress of the 100 (lower values have less
stress
voice on spoken text. stress and higher values have
div { stress:0; }
more stress).
Declares the voice family Generic or specific voice family
voice-family More Information
of spoken text. names.
Numbers between 0 and 100,
percentages, or one of the
following predefined values:
div { volume:50; }
Declares the median silent
volume
volume. x-soft
div { volume:silent; }
soft
medium
loud
x-loud
SONIYA SUTHAR 20