w3schools
Search W3Schools :  
  
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About
YOUR FREE WEBSITE

Free Flash Website
Free Flash Templates
Free Web Design

CSS Basic

CSS HOME
CSS Introduction
CSS Syntax
CSS How To
CSS Background
CSS Text
CSS Font
CSS Box Model
CSS Border
CSS Outline
CSS Margin
CSS Padding
CSS List
CSS Table

CSS Advanced

CSS Dimension
CSS Classification
CSS Positioning
CSS Pseudo-class
CSS Pseudo-element
CSS Image Gallery
CSS Image Opacity
CSS Media Types
CSS Don't
CSS Summary

CSS Examples

CSS Examples

CSS References

CSS Reference
CSS Ref Alphabetical
CSS Ref Aural
CSS Units
CSS Colors
CSS Colorvalues
CSS Colornames

CSS Quiz

CSS Quiz
CSS Exam

 

CSS Reference

Previous Next

The links in the "Property" column point to syntax, examples, browser support, and other useful information about each property.

The "CSS" column indicates in which CSS version the property is defined (CSS1 or CSS2).

Background Properties

Property Description Values CSS
background Sets all the background properties in one declaration background-color
background-image
background-repeat
background-attachment
background-position

inherit
1
background-attachment Sets whether a background image is fixed or scrolls with the rest of the page scroll
fixed
inherit
1
background-color Sets the background color of an element color-rgb
color-hex
color-name
transparent
inherit
1
background-image Sets the background image for an element url(URL)
none
inherit
1
background-position Sets the starting position of a background image top left
top center
top right
center left
center center
center right
bottom left
bottom center
bottom right
x% y%
xpos ypos
inherit
1
background-repeat Sets how a background image will be repeated repeat
repeat-x
repeat-y
no-repeat
inherit
1

Border and Outline Properties

Property Description Values CSS
border Sets all the border properties in one declaration border-width
border-style
border-color
inherit
1
border-bottom Sets all the bottom border properties in one declaration border-bottom-width
border-bottom-style
border-bottom-color
inherit
1
border-bottom-color Sets the color of the bottom border border-color
inherit
2
border-bottom-style Sets the style of the bottom border border-style
inherit
2
border-bottom-width Sets the width of the bottom border border-width
inherit
1
border-color Sets the color of the four borders color_name
hex_number
rgb_number
transparent
inherit
1
border-left Sets all the left border properties in one declaration border-left-width
border-left-style
border-left-color
inherit
1
border-left-color Sets the color of the left border border-color
inherit
2
border-left-style Sets the style of the left border border-style
inherit
2
border-left-width Sets the width of the left border border-width
inherit
1
border-right Sets all the right border properties in one declaration border-right-width
border-right-style
border-right-color
inherit
1
border-right-color Sets the color of the right border border-color
inherit
2
border-right-style Sets the style of the right border border-style
inherit
2
border-right-width Sets the width of the right border border-width
inherit
1
border-style Sets the style of the four borders none
hidden
dotted
dashed
solid
double
groove
ridge
inset
outset
inherit
1
border-top Sets all the top border properties in one declaration border-top-width
border-top-style
border-top-color
inherit
1
border-top-color Sets the color of the top border border-color
inherit
2
border-top-style Sets the style of the top border border-style
inherit
2
border-top-width Sets the width of the top border border-width
inherit
1
border-width Sets the width of the four borders thin
medium
thick
length
inherit
1
outline Sets all the outline properties in one declaration outline-color
outline-style
outline-width
inherit
2
outline-color Sets the color of an outline color-rgb
color-hex
color-name
invert
inherit
2
outline-style Sets the style of an outline none
dotted
dashed
solid
double
groove
ridge
inset
outset
inherit
2
outline-width Sets the width of an outline thin
medium
thick
length
inherit
2

Dimension Properties

Property Description Values CSS
height Sets the height of an element auto
length
%
inherit
1
max-height Sets the maximum height of an element none
length
%
inherit
2
max-width Sets the maximum width of an element none
length
%
inherit
2
min-height Sets the minimum height of an element length
%
inherit
2
min-width Sets the minimum width of an element length
%
inherit
2
width Sets the width of an element auto
length
%
inherit  
1

Font Properties

Property Description Values CSS
font
Sets all the font properties in one declaration font-style
font-variant
font-weight
font-size/line-height
font-family
caption
icon
menu
message-box
small-caption
status-bar
inherit
1
font-family
Specifies the font family for text family-name
generic-family
inherit
1
font-size
Specifies the font size of text xx-small
x-small
small
medium
large
x-large
xx-large
smaller
larger
length
%
inherit
1
font-style
Specifies the font style for text normal
italic
oblique
inherit
1
font-variant
Specifies whether or not a text should be displayed in a small-caps font normal
small-caps
inherit
1
font-weight
Specifies the weight of a font normal
bold
bolder
lighter
100
200
300
400
500
600
700
800
900
inherit
1

Generated Content Properties

Property Description Values CSS
content Used with the :before and :after pseudo-elements, to insert generated content normal
none
content specifications
inherit
2
counter-increment Increments one or more counters none
id number
inherit
2
counter-reset Creates or resets one or more counters none
id number
inherit
2
quotes Sets the type of quotation marks for embedded quotations none
string string
inherit
2

List Properties

Property Description Values CSS
list-style Sets all the properties for a list in one declaration list-style-type
list-style-position
list-style-image
inherit
1
list-style-image Specifies an image as the list-item marker URL
none
inherit
1
list-style-position Specifies where to place the list-item marker inside
outside
inherit
1
list-style-type Specifies the type of list-item marker none
disc
circle
square
decimal
decimal-leading-zero
armenian
georgian
lower-alpha
upper-alpha
lower-greek
lower-latin
upper-latin
lower-roman
upper-roman
inherit
1

Margin Properties

Property Description Values CSS
margin Sets all the margin properties in one declaration auto
length
%
inherit
1
margin-bottom Sets the bottom margin of an element auto
length
%
inherit
1
margin-left Sets the left margin of an element auto
length
%
inherit
1
margin-right Sets the right margin of an element auto
length
%
inherit
1
margin-top Sets the top margin of an element auto
length
%
inherit
1

Padding Properties

Property Description Values CSS
padding Sets all the padding properties in one declaration length
%
inherit
1
padding-bottom Sets the bottom padding of an element length
%
inherit
1
padding-left Sets the left padding of an element length
%
inherit
1
padding-right Sets the right padding of an element length
%
inherit
1
padding-top Sets the top padding of an element length
%
inherit
1

Positioning Properties

Property Description Values CSS
bottom Sets the bottom margin edge for a positioned box auto
length
%
inherit
2
clear Specifies which sides of an element where other floating elements are not allowed none
left
right
both
inherit
1
clip Clips an absolutely positioned element shape
auto
inherit
2
cursor Specifies the type of cursor to be displayed URL
auto
crosshair
default
e-resize
help
move
n-resize
ne-resize
nw-resize
pointer
progress
s-resize
se-resize
sw-resize
text
w-resize
wait
inherit
2
display Specifies the type of box an element should generate block
inline
inline-block
inline-table
list-item
run-in
table
table-caption
table-cell
table-column
table-column-group
table-footer-group
table-header-group
table-row
table-row-group
none
inherit
1
float Specifies whether or not a box should float left
right
none
inherit
1
left Sets the left margin edge for a positioned box auto
length
%
inherit
2
overflow
Specifies what happens if content overflows an element's box auto
hidden
scroll
visible
inherit
2
position Specifies the type of positioning for an element absolute
fixed
relative
static
inherit
2
right Sets the right margin edge for a positioned box auto
length
%
inherit
2
top Sets the top margin edge for a positioned box auto
length
%
inherit
2
visibility Specifies whether or not an element is visible visible
hidden
collapse
inherit
2
z-index Sets the stack order of an element number
auto
inherit
2

Print Properties

Property Description Values CSS
orphans Sets the minimum number of lines that must be left at the bottom of a page when a page break occurs inside an element number
inherit
2
page-break-after Sets the page-breaking behavior after an element auto
always
avoid
left
right
inherit
2
page-break-before Sets the page-breaking behavior before an element auto
always
avoid
left
right
inherit
2
page-break-inside Sets the page-breaking behavior inside an element auto
avoid
inherit
2
widows Sets the minimum number of lines that must be left at the top of a page when a page break occurs inside an element number
inherit
2

Table Properties

Property Description Values CSS
border-collapse Specifies whether or not table borders should be collapsed collapse
separate
inherit
2
border-spacing Specifies the distance between the borders of adjacent cells length
inherit
2
caption-side Specifies the placement of a table caption top
bottom
inherit
2
empty-cells Specifies whether or not to display borders and background on empty cells in a table show
hide
inherit
2
table-layout Sets the layout algorithm to be used for a table auto
fixed
inherit
2

Text Properties

Property Description Values CSS
color Sets the color of text color-rgb
color-hex
color-name
inherit
1
direction Specifies the text direction/writing direction ltr
rtl
inherit
2
letter-spacing Increases or decreases the space between characters in a text normal
length
inherit
1
line-height Sets the line height normal
number
length
%
inherit
1
text-align Specifies the horizontal alignment of text left
right
center
justify
inherit
1
text-decoration Specifies the decoration added to text blink
line-through
none
overline
underline
inherit
1
text-indent Specifies the indentation of the first line in a text-block length
%
inherit
1
text-shadow Specifies the shadow effect added to text none
shadow
inherit
2
text-transform Controls the capitalization of text none
capitalize
uppercase
lowercase
inherit
1
unicode-bidi   normal
embed
bidi-override
inherit
2
vertical-align Sets the vertical alignment of an element length
%
baseline
sub
super
top
text-top
middle
bottom
text-bottom
inherit
1
white-space Specifies how white-space inside an element is handled normal
nowrap
pre
pre-line
pre-wrap
inherit
1
word-spacing Increases or decreases the space between words in a text normal
length
inherit
1

CSS Pseudo-classes/elements

Pseudo name Description CSS
:active Adds a style to an element that is activated 1
:after Adds content after an element 2
:before Adds content before an element 2
:first-child Adds a style to an element that is the first child of another element 2
:first-letter Adds a style to the first character of a text 1
:first-line Adds a style to the first line of a text 1
:focus Adds a style to an element that has keyboard input focus 2
:hover Adds a style to an element when you mouse over it 1
:lang Adds a style to an element with a specific lang attribute 2
:link Adds a style to an unvisited link 1
:visited Adds a style to a visited link 1


Previous Next


Altova® XMLSpy® - The industry-leading XML editor!

Altova XMLSpy

Whether you're new to XML or already an advanced user, the user-friendly views and powerful entry helpers, wizards, and debuggers in XMLSpy are designed to meet your XML and Web development needs from start to finish.

  • XML editor
  • Graphical XML Schema / DTD editors
  • XSLT 1.0/2.0 editor, debugger, profiler
  • XQuery editor, debugger, profiler
  • XBRL validator & taxonomy editor
  • Support for Office Open XML (OOXML)
  • Graphical WSDL editor & SOAP debugger
  • Java, C#, C++ code generation
  • And much more!

Download a free trial today!

  Altova XMLSpy

 
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting
WEB BUILDING
Website Templates
Flash Templates
Website Builder
Internet Business Opportunity
Get a Freelancer
Download XML editor
FREE Flash Website
FREE Web Templates
FLIGHT TICKETS
Find the cheapest flight
to any destination now!
EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification
STATISTICS
Browser Statistics
Browser OS
Browser Display
W3Schools.com HOME | TOP | PRINT | FORUM | ABOUT
W3Schools is for training only. We do not warrant the correctness of its content. The risk from using it lies entirely with the user.
While using this site, you agree to have read and accepted our terms of use and privacy policy.
Copyright 1999-2009 by Refsnes Data. All Rights Reserved.